0
votes

I used [PFUser logOut]; in my project, it all works well on IOS 8.2 devices, but when it came to iOS 7.1, it just doesn't work well, and every time I click the logout button which call [PFUser logOut]; it well show :Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't use nil for keys or values on PFObject. Use NSNull for values.'

And here is my code:

  • (IBAction)Logout:(id)sender { [PFUser logOut]; // Return to Login view controller [self.navigationController popToRootViewControllerAnimated:YES]; }

I'm not sure what happen there and feel very weird. Anyone will help me you?

1

1 Answers

0
votes

I believe I have found out the reason: though I have log out but some where in the project still upload [PFUser currentUser] information, so there will be such error, so just make sure every time you call [PFUser currentUser] it is not null.