Guest User

Untitled

a guest
Mar 21st, 2016
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. func signupEmail(email: String, pwd: String) {
  2. let user = PFUser()
  3. user.password = pwd
  4. user.email = email
  5. // other fields can be set just like with PFObject
  6. // user["phone"] = "415-392-0202"
  7.  
  8. user.signUpInBackgroundWithBlock {
  9. (succeeded: Bool, error: NSError?) -> Void in
  10. if let error = error {
  11. let errorString = error.userInfo["error"] as? NSString
  12. // Show the errorString somewhere and let the user try again.
  13. print(errorString)
  14. } else {
  15. // Hooray! Let them use the app now.
  16. }
  17. }
  18. }
Add Comment
Please, Sign In to add comment