Code for the login:
[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 whether user is logged or not with
if ([PFUser currentUser]) {
// user is logged
}
It means PFUser logInWithUsernameInBackground:password: download the user data and store it somewhere in iOS, I don't know whether it is in plist or another file, or maybe session.
Where does Parse Framework store user login session in iOS?
I had a bit of a poke around an app of mine that uses Parse and found the following.

Inside Library/Private Documents/Parse there is a currentUser file, and this contains the JSON representation of your user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With