0

I have an if ([PFUser currentUser]) check in my AppDelegate. I created a user then deleted them, but if ([PFUser currentUser]) returns true and has the user's former objectId even though they have been deleted from the Data Browser.

Here is my code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary     *)launchOptions
{

[Parse setApplicationId:PARSE_APPLICATION_ID clientKey:PARSE_CLIENT_KEY];

UIViewController *startingVC;

[[PFUser currentUser] refresh];

if ([PFUser currentUser]) 
    NSLog(@"current user: %@", [[PFUser currentUser] objectId]);

And current user returns the objectId of a deleted user

cph2117
  • 2,651
  • 1
  • 28
  • 41

1 Answers1

0

Try calling [[PFUser currentUser] refresh] before your if statements.

Jacob
  • 2,338
  • 2
  • 22
  • 39