1

我正在尝试使用GKGameSession随 iOS 10 发布的 GameKit 制作一个简单的应用程序。在大多数情况下,一切正常,但是使用我的一个测试帐户,我可以使用创建会话GKGameSession.createSessionInContainer:,但是获取会话会导致在完成时返回错误处理程序说“无法与帮助应用程序通信”。

该代码适用于我的开发人员帐户,以及我朋友手机上的非开发人员帐户,但是在我的普通 iCloud 帐户(过去也用于开发)上,每当我打电话时,它都会不断收到此错误:

-GKGameSession.loadSessionWithIdentifier

-GKGameSession.loadSessionInContainer

我检查了设备日志,gamed框架中似乎出现了崩溃(据我了解,GameKit)。堆栈跟踪中没有应用程序功能,都是 Apple 代码,因此看起来后台 GameKit 服务正在崩溃。导致崩溃的行是NSPropertyListSerialization.propertyListWithData:options:format:error:,它抛出异常并调用abort().

回溯如下:

Incident Identifier: 8752E0F1-3FD4-45FC-93DA-3ED9E873FC9E
CrashReporter Key:   364113fe5ed8ba263006d41287924aedcb897647
Hardware Model:      iPhone8,2
Process:             gamed [1399]
Path:                /usr/libexec/gamed
Identifier:          gamed
Version:             ???
Code Type:           ARM-64 (Native)
Role:                Unspecified
Parent Process:      launchd [1]
Coalition:           <none> [265]


Date/Time:           2017-03-27 07:30:55.8324 +0100
Launch Time:         2017-03-26 23:49:39.2894 +0100
OS Version:          iPhone OS 10.2.1 (14D27)
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called

Filtered syslog:
None found

Last Exception Backtrace:
0   CoreFoundation                  0x184d491b8 __exceptionPreprocess + 124
1   libobjc.A.dylib                 0x18378055c objc_exception_throw + 56
2   CoreFoundation                  0x184d49100 +[NSException raise:format:] + 116
3   Foundation                      0x18577b2b0 +[NSPropertyListSerialization propertyListWithData:options:format:error:] + 76
4   gamed                           0x1000c7cac 0x100014000 + 736428
5   gamed                           0x1000cfa90 0x100014000 + 768656
6   gamed                           0x1000c8190 0x100014000 + 737680
7   gamed                           0x1000cdb6c 0x100014000 + 760684
8   gamed                           0x1000d4428 0x100014000 + 787496
9   gamed                           0x1000e17b4 0x100014000 + 841652
10  libdispatch.dylib               0x183bd21fc _dispatch_call_block_and_release + 24
11  libdispatch.dylib               0x183bd21bc _dispatch_client_callout + 16
12  libdispatch.dylib               0x183bd6d68 _dispatch_main_queue_callback_4CF + 1000
13  CoreFoundation                  0x184cf6810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14  CoreFoundation                  0x184cf43fc __CFRunLoopRun + 1660
15  CoreFoundation                  0x184c222b8 CFRunLoopRunSpecific + 444
16  Foundation                      0x18575f26c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
17  Foundation                      0x1857b3aa0 -[NSRunLoop(NSRunLoop) run] + 88
18  gamed                           0x100018bdc 0x100014000 + 19420
19  libdyld.dylib                   0x183c055b8 start + 4

我尝试在不同的设备上使用相同的帐户,注销,硬重置,擦除设备不同的 iCloud 容器,重置 iCloud 容器并发布到 live 并尝试实时构建,但问题似乎出在这个特定的 iCloud 帐户上.

我也做了一个新的项目,刚刚打了GKGameSession.loadSessionWithIdentifier:电话,viewDidLoad()但每次的结果都是一样的。

如果是文件被序列化的错误,.plist我猜想与此帐户关联的某些数据已损坏或什么?

我一直在把头发拉出来,所以任何帮助都会很棒。

谢谢

4

0 回答 0