Persist Parse User between AppStore updates

I was under the impression that [PFUser currentUser] handled user caching between AppStore updates, but I think I am wrong.

In other words: I don't want the user to have to sign up every time I click update in the App Store. Is there a Parse function to handle this? Or am I using NSUserDefaults or something?

First for me on this topic ... Be kind :)

+3


source to share


1 answer


Try to select the current user first - maybe the Parse singleton is not saving / not saving the currentUser. My code looks like this:



 //[[PFUser currentuser] fetch] sometimes hangs for a while, I don't know why. Kick off to the bg.
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        [[PFUser currentUser] fetch];

        if (![PFUser currentUser])
        {
            dispatch_async(dispatch_get_main_queue(), ^{
                // Display login screen
                [self.window.rootViewController presentViewController:authViewController animated:NO completion:nil];
            });
        }
    });

      

0


source







All Articles