Note that there are some explanatory texts on larger screens.

plurals
  1. POGame Center doesn't respond to authenticateWithCompletionHandler request (iOS)
    primarykey
    data
    text
    <p>Here's my situation:</p> <p>1) The user opens my application for the first time. I immediately call authenticateLocalUser to try and log them into Game Center. The popup with the Login, Create Account, and Cancel buttons successfully appears.</p> <p>2) The user doesn't want to log in right now, so they click Cancel. (This is NOT the 3rd time they've clicked 'cancel', and I am NOT receiving the 'Game center disabled, log in from the Game Center app to enable' message.) The user can continue to use my app as normal.</p> <p>3) The user wants to use Game Center later on, so they click a button I have given them to log into the Game Center. I again call authenticateLocalUser. This time, the popup does NOT appear. In fact nothing happens, except that I receive these console log messages:</p> <pre><code>2012-04-26 08:38:42.861 Clink[332:707] authenticateWithCompletionHandler: enter 2012-04-26 08:38:42.863 Clink[332:707] authenticateWithCompletionHandler: exit </code></pre> <p>4) I have tested both immediately pushing the button which calls authenticateLocalUser again, and also waiting a significant period of time before doing so. At whatever point I call authenticateLocalUser again, once again nothing appears, and I get this error from the function:</p> <pre><code>Error Domain=GKErrorDomain Code=7 "The requested operation could not be completed because local player is already authenticating." </code></pre> <p>So what appears to be happening is that, when I call authenticateLocalUser in Step 3, I am asking Game Center to authenticate but it is getting hung up and not responding to my request. Then in Step 4 when I try again, it tells me it cannot process my request because it is already trying to authenticate. However I have waited up to 10 minutes for a response from my request in Step 3, and I never get one from the Game Center.</p> <p>This is the content of my authenticateLocalUser function. As far as I recall i haven't changed it from the version I downloaded from Apple's sample code.</p> <pre><code>- (void) authenticateLocalUser { if([GKLocalPlayer localPlayer].authenticated == NO) { [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) { [self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg: NULL error: error]; }]; } } </code></pre> <p>Has anyone else encountered this problem before or have any ideas about what might be going on? I've been looking at this for a while and am not really sure what's happening.</p> <p>Thanks in advance!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload