user2353228
user2353228

Reputation: 175

game center authentication in ios6

In ios6, I use the following code to authenticate on game center:

    [GKLocalPlayer localPlayer].authenticateHandler = ^(UIViewController* viewController, NSError* error)
    {
    if (error != nil)
   {
        return;
    }
    else
    {
        if (viewController != nil)
        {
            [rootViewController presentModalViewController:viewController animated:YES];
        }
    }

The code above is bind to a button. Things works fine if the users correctly entered their username and password. However, if the user canceled the viewController and then tab the button again, the code block is never entered again. I want to show the login viewController after each time the user tabs the button (or at least for the first two or three times). How could I update my code?

Thanks for your reply

Upvotes: 3

Views: 469

Answers (1)

Ken
Ken

Reputation: 31161

This is by Apple's design and has nothing to do with your button. This has been noted elsewhere on StackOverflow too, and by me in my own work.

Upvotes: 2

Related Questions