我不断从 GA 和用户那里收到此崩溃报告...但是我无法通过使用 ios7 和 ios8 测试 iphone5、5s、6 来重现此异常。当应用程序确实进入后台时,此问题无处可寻。奇怪的是,gamecenter 会调用 spritekit,用于显示成就横幅?
有没有人有同样的问题?
Last Exception Backtrace:
0 CoreFoundation 0x23c99e3f __exceptionPreprocess + 127
1 libobjc.A.dylib 0x31371c8b objc_exception_throw + 38
2 CoreFoundation 0x23c9f189 -[NSObject(NSObject) doesNotRecognizeSelector:] + 188
3 CoreFoundation 0x23c9d0a7 ___forwarding___ + 714
4 CoreFoundation 0x23bcf208 _CF_forwarding_prep_0 + 24
5 SpriteKit 0x26fe9689 -[SKNode isEqual:] + 164
6 Foundation 0x248ec9ff +[NSObject(NSDelayedPerforming) cancelPreviousPerformRequestsWithTarget:] + 358
7 GameCenterFoundation 0x2a945873 -[GKPlayer postChangeNotification] + 38
8 GameCenterFoundation 0x2a958d21 __52-[GKDaemonProxy setLocalPlayer:authenticated:reply:]_block_invoke + 848
9 libdispatch.dylib 0x318d18cb _dispatch_call_block_and_release + 10
10 libdispatch.dylib 0x318d18b7 _dispatch_client_callout + 22
11 libdispatch.dylib 0x318d50bf _dispatch_main_queue_callback_4CF + 722
12 CoreFoundation 0x23c5fbe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
13 CoreFoundation 0x23c5e2e9 __CFRunLoopRun + 1512
14 CoreFoundation 0x23bac621 CFRunLoopRunSpecific + 476
15 CoreFoundation 0x23bac433 CFRunLoopRunInMode + 106
16 GraphicsServices 0x2af1b0a9 GSEventRunModal + 136
17 UIKit 0x27197359 UIApplicationMain + 1440
18 MyAppName 0x001b4f27 main (main.m:16)
19 libdyld.dylib 0x318f1aaf start + 2
iOS8 GKLocalPlayerInternal Unrecognized Selector上的类似崩溃问题
我尝试了使用 SKNode 和 GKPlayer 的测试
SKNode* node = [SKNode node];
GKPlayer* player = [GKLocalPlayer localPlayer];
[node isEqual:player];
会导致下面和上面结果一样的异常,意思是系统比较SKNode和[GKPlayer postChangeNotification]....真的很奇怪。
-[GKLocalPlayerInternal name]: unrecognized selector sent to instance 0x1b6e3f80