Posts

Post not yet marked as solved
7 Replies
16k Views
I have an turn-based game using GameKit in iOS. Generally, my authentication with Game Center works. My game works and I can for periods of time send moves back and forth. However, relatively frequently but not constantly, when I try to perform an action (e.g., finding a new match) over Game Center it fails with the error:Error Domain=GKErrorDomain Code=6 "The requested operation could not be completed because local player has not been authenticated." UserInfo={NSLocalizedDescription=The requested operation could not be completed because local player has not been authenticated.}Yet, the GKLocalPlayer.localPlayer().authenticated = true, both immediately before getting the error and after. After getting this error, the authentication viewController does not get presented and GameKit methods that rely on authentication cease to function (they don't come back to life ). Then, if I send the app to the background and then bring it back to the foreground, the error does not return when I retry the action (without requiring new login and password entry).According to this similar observation:GKLocalPlayer authentication not working, but isAuthenticated returns YES (Game Center sandbox)http://stackoverflow.com/questions/23541764/gklocalplayer-authentication-not-working-but-isauthenticated-returns-yes-game"1.Game Center fails to complete authentication if your device has incorrect dates. So, go ahead and check the current date.You might have done this. I trust you - iOS Simulator >> Reset Content and Settings"I am getting this problem on the device, not the simulator, ruling out #2. Could someone help me with #1? I may be naive here, but my iPhone and iPad have the right time and date. Is there something or somewhere else I should be checking and setting?Then, if this is not the issue, what else could be the problem? I am running iOS9.
Posted
by cdubfoo.
Last updated
.