Where is user session Parse store
Login code:
[PFUser logInWithUsernameInBackground:self.userTextField.text password:self.passwordTextField.text block:^(PFUser *user, NSError *error) {
if (user) {
[self performSegueWithIdentifier:@"LoginSuccesful" sender:self];
}
else {
NSInteger code = [error code];
NSString *message;
if (code == 100) {
message = @"No Internet Connection";
}
else if(code == 101) {
message = @"Wrong credentials";
}
UIAlertView *errorAlertView = [[UIAlertView alloc] initWithTitle:@"Error" message:message delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[errorAlertView show];
}
}];
We can check if the user is registered or not with
if ([PFUser currentUser]) {
// user is logged
}
This means that PFUser logInWithUsernameInBackground: password: downloads user data and stores it somewhere in iOS, I don't know if it's in a plist or another file, or maybe in a session.
Where does Parse Framework store iOS user login session?
+3
source to share