1

I have a SpriteKit project in Xcode with Game Center enabled, I have it working where it shows the leaderboards, achievements, and all that stuff works. I found out after submitting it to Apple that it crashes with this error message:

<Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GKLocalPlayerInternal name]: unrecognized selector sent to instance 0x177a4eb0'
*** First throw call stack:
(0x2563cd67 0x32e9bc77 0x2564222d 0x25640109 0x25571938 0x28991bdd 0x26291ed7 0x2c355897 0x2c368d31 0x333fc423 0x333fc40f 0x334071b5 0x25602c41 0x25601361 0x2554e981 0x2554e793 0x2c927051 0x28b40981 0xda63d 0x33437aaf)

It happens when the app enters the background and comes back, sometimes (not always) it crashes.

I have searched my app for GKLocalPlayerInternal with no results, I've seen in my research HERE that this is because of an authentication glitch in iOS 8 with SpriteKit. What am I supposed to do if it really is Apple's fault, as a bug in spriteKit?

If all else fails, is it possible to just tell Game Center to not authenticate at all after it comes back from the background because we know it will crash.

Thanks in advance

Community
  • 1
  • 1
user3386154
  • 99
  • 1
  • 10
  • check every instance where you use the 'name' property or method because you are sending that to a GKLocalPlayer which doesn't have this selector – CodeSmile Nov 03 '14 at 09:03
  • 1
    @LearnCocos2D I have this issue also. GKLocalPlayerInternal is not a class you have access to, and therefore, this crash occurs when you do not try calling `name` on it. I have isolated it down to one line, as I mentioned on another post. The line that causes it is `[GKLocalPlayer localPlayer].authenicateHandler = ...` Without that line, the app continues fine. With it, the app crashes. http://stackoverflow.com/questions/26897941/gamecenter-authentication-issue – erdekhayser Nov 16 '14 at 02:07

0 Answers0