/ Published in: Objective C
A method to create a Unity account
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
{ Profile *newUser = [[Profile alloc]init]; newUser.name=name; newUser.icon=profileImageData; newUser.email=email; newUser.scope=ScopePublic; newUser.emailScope = ScopePublic; [self createUnityProfile:newUser withPassword:password withCompletionBlock:^(Profile * object, bool success, NSString * errorMessage) { completionBlock(object,success,errorMessage); }]; } -(IBAction)createAccountButtonWasPressed:(id)sender { [self createAccountWithName:self.firstNameTextField.text withEmail:self.emailTextField.text withPassword:self.passwordTextField.text withScope:ScopePublic withProfileImage:imageData withCompletionBlock:^(Profile * object, bool success, NSString * errorMessage){ if(success) { if(object) { // store user profile } else { NSLog(@"No object returned"); } } else { NSLog(@"%@",errorMessage); } }]; }