SHARE
TWEET

Untitled

a guest Aug 13th, 2016 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if PFUser.currentUser() != nil {
  2.  
  3. }
  4.    
  5. let user = PFUser()
  6.     user.username = "USERNAME"
  7.     user.password = "PASSWORD"
  8.     user.email = "EMAIL"
  9.     // add more fields
  10.  
  11.     user.signUpInBackgroundWithBlock {
  12.         (succeeded: Bool, error: NSError?) -> Void in
  13.  
  14.         if succeeded {
  15.             // here the current user should not be nil.
  16.             // if it is then please check for sessionToken
  17.             if PFUser.currentUser() != nil {
  18.                 // user is logged in
  19.             }
  20.         }
  21.  
  22.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top