I have no clue what the issue is here. If I log in using
PFUser.logInWithUsernameInBackground(username, password: password, block: {
(user,error) in
completion(error == nil)
})
}
...the authentication works and the segue is performed. I can access PFUser.currentUser() just fine. After double-tapping the home button on the iPhone and swiping the app away, I re-open the app and I am asked to log in again. The currentUser() is always nil on app open.
if PFUser.currentUser() == nil {
segueIdentifier = "LoginView"
}else{
segueIdentifier = "MainView"
}
Why won't the currentUser persist? Doesn't Parse cache the login info so I can bypass the login segue?
Aucun commentaire:
Enregistrer un commentaire