Manually Registering an Application

Manually register an application synchronously or ansynchronously by using the user name and activation code of the application registered through the Sybase Control Center.

Syntax

-(void) registerUser : (NSString *) username
withActivationCode: (NSString *) activationCode
-(void) registerUserAsynchronousWithUserName: (NSString *) username
activationCode: (NSSting *) activationCode

Parameters

  • username – User name of the user to be registered.
  • activationCode – Activation code of the user created in SCC.

Examples

  • Synchronous registration of an application using a delegate
    LiteSUPUserManager* userManager = [LiteSUPUserManager getInstance:@"APP_ID"];
              [userManager setDelegate:self];
              [userManager setDidFailToRegisterUser:@selector(regFailed:)];
              [userManager setDidSuccessfulUserRegistration:@selector(regSuccess:)];
              [userManager setConnectionProfile:@"10.53.222.37" withSupPort:5001 withServerFarmID:@"0"];
     
    [userManager registerUser:@"manualuser" withActivationCode:@"123"];
    
  • Synchronous Registration of an application without a delegate
    LiteSUPUserManager* userManager = [LiteSUPUserManager getInstance:@"APP_ID"];
              [userManager setConnectionProfile:@"10.53.222.37" withSupPort:5001 withServerFarmID:@"0"];
        @try {
                      // Manual On-boarding
                    [userManager registerUser:@"manualuser" withActivationCode:@"123"]; 
    }
     @catch (NSException * e) {
                    // Exception Handling
    }
  • Asynchronous Registration of an application using a delegate – The user registration runs as a background process and has to have a delegate registered to provide success/failure notifications.
    LiteSUPUserManager* userManager = [LiteSUPUserManager getInstance:@"APP_ID"];
              [userManager setDelegate:self];
              [userManager setDidFailToRegisterUser:@selector(regFailed:)];
              [userManager setDidSuccessfulUserRegistration:@selector(regSuccess:)];
              [userManager setConnectionProfile:@"10.53.222.37" withSupPort:5001 withServerFarmID:@"0"];
     [userManager registerUserAsynchronousWithUserName:@"manualuser" activationCode:@"123"];