Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func signupEmail(email: String, pwd: String) {
- let user = PFUser()
- user.password = pwd
- user.email = email
- // other fields can be set just like with PFObject
- // user["phone"] = "415-392-0202"
- user.signUpInBackgroundWithBlock {
- (succeeded: Bool, error: NSError?) -> Void in
- if let error = error {
- let errorString = error.userInfo["error"] as? NSString
- // Show the errorString somewhere and let the user try again.
- print(errorString)
- } else {
- // Hooray! Let them use the app now.
- }
- }
- }
Add Comment
Please, Sign In to add comment