5.1. SMCloudServices

Provides the function of SMCS service

  • Method

    Name

    Contents

    showRegistrationView

    It displays a view of the Star Micronics Cloud registration.

    isRegistered

    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.

../_images/SMCS_Registration_View1.png
  • 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 … Registered
    NO … Unregistered
    void (^)(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
    Result
    YES … Registered
    NO … Unregistered
    BOOL
  • Examples

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
        ...
    
        BOOL userInteractionEnabled = YES;
    
        if ([SMCloudServices isRegistered] == NO) {
        userInteractionEnabled = NO;
        }
    
        ...
    
        return cell;
    }
    

    Refer to AllReceiptsViewController.m.