5.1 Register with Password
Sample Code
BayunAppCredentials *appCredentials = [[BayunAppCredentials alloc] initWithAppId:@"<appId>"
appSecret:@"<appSecret>" appSalt:@"<appSalt>" baseURL: @"<baseURL>"];
[[BayunCore sharedInstance] registerWithCompanyName:@"<companyName>"
uiViewController : self
companyEmployeeId:@"<companyEmployeeId>"
password:@"<password>"
bayunAppCredentials:appCredentials
authorizeEmployeeCallback:^(NSString *employeePublicKey) {
NSLog(@"Authorization of EmployeePublicKey is Pending");
} success:^{
NSLog(@"Employee registered with Bayun successfully.");
} failure:^(BayunError errorCode) {
NSLog(@"Employee registration failed.");
}];let appCredentials : BayunAppCredentials = BayunAppCredentials(appId: "<appId>", appSecret: "<appSecret>",
appSalt: "<appSalt>", baseURL: "<baseURL>")
BayunCore.sharedInstance()?.register(withCompanyName: "<companyName>",
uiViewController : self,
companyEmployeeId: "<companyEmployeeId>",
password: "<password>",
bayunAppCredentials: appCredentials,
authorizeEmployeeCallback: { (employeePublicKey) in
NSLog("Authorization of EmployeePublicKey is Pending")
}, success: {
NSLog("Employee registered with Bayun successfully.")
}, failure: {(error) in
NSLog("Employee registration failed.")
})Last updated