5.1. SMCloudServices¶
Provides the function of SMCS service
Method
Name
Contents
It displays a view of the Star Micronics Cloud registration.
Checks whether the application is registered with the Star Micronics Cloud.
5.1.1. showRegistrationView¶
It displays a view of the Star Micronics Cloud registration.
Declaration
+ (void)showRegistrationView:(void (^)(BOOL isRegistered))completion;
Parameter
Name Contents Type completion When the View is closed, check application registration status as following parameter.- isRegistered -YES … RegisteredNO … Unregisteredvoid (^)(BOOL isRegistered) Return value
None
Examples
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ... [SMCloudServices showRegistrationView:^(BOOL isRegistration) { [_tableView reloadData]; }]; ... }
Refer to AllReceiptsViewController.m.
5.1.2. isRegistered¶
Checks whether the application is registered with the Star Micronics Cloud.
Declaration
+ (BOOL)isRegistered;
Parameter
None
Return value
Contents Type ResultYES … RegisteredNO … UnregisteredBOOL
Examples
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ... BOOL userInteractionEnabled = YES; if ([SMCloudServices isRegistered] == NO) { userInteractionEnabled = NO; } ... return cell; }
Refer to AllReceiptsViewController.m.