5

我在 iOS8 SDK 上构建了一个应用程序,我将其存档,然后签署临时分发。

这已经在所有具有各种更新的设备上运行了 2 年。现在我有一部 iPhone 6 plus。

该应用程序在新安装后第一次运行良好,但现在它不断崩溃并出现错误:

“XPC API 滥用:给定对象不是所需类型”

这发生在它进入之前didFinishLaunchingWithOptions

调用堆栈:

Thread 0 name: XPC API Misuse: Given object not of required type. Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libxpc.dylib 0x0000000197dd99d8 _xpc_api_misuse + 60 1 libxpc.dylib 0x0000000197dd99d4 _xpc_api_misuse + 56 2 libxpc.dylib 0x0000000197dc9ae8 xpc_dictionary_set_value + 88 3 libxpc.dylib 0x0000000197dc5538 xpc_dictionary_set_string + 48 4 CoreFoundation 0x0000000186e4b590 _CFXNotificationRemoveObservers + 912 5 Foundation 0x0000000187d1ff20 -[NSNotificationCenter removeObserver:name:object:] + 252 6 UIKit 0x000000018b8588e4 -[UITableView dealloc] + 96 7 UIKit 0x000000018b6bf510 -[UIView(Hierarchy) removeFromSuperview] + 696 8 UIKit 0x000000018b79cb24 -[UIScrollView removeFromSuperview] + 76 9 UIKit 0x000000018b6c219c -[UIView dealloc] + 444 10 CoreFoundation 0x0000000186e217e4 CFRelease + 520 11 CoreFoundation 0x0000000186e2dda4 -[__NSArrayM dealloc] + 148 12 libobjc.A.dylib 0x0000000197599720 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 560 13 CoreFoundation 0x0000000186e25400 _CFAutoreleasePoolPop + 24 14 Foundation 0x0000000187d1f180 -[NSAutoreleasePool release] + 144 15 UIKit 0x000000018b72f9ac -[UIApplication _run] + 584 16 UIKit 0x000000018b72a980 UIApplicationMain + 1484 17 HelloWorld 0x000000010000636c main (main.m:16) 18 libdyld.dylib 0x0000000197beea04 start + 0

任何人都可以帮忙吗?

4

2 回答 2

1

我在自己的应用程序中修复了崩溃,但我无法 100% 确定根本原因。我怀疑这是内存损坏或过度保留对象。

关键是[UITableView dealloc]我在我的表视图中实现了 dealloc 以查看问题发生在哪里。我最终将其追溯到UITableViewCell.xib 文件的实例化。这个特殊的 .xib 包含多个UITableViewCells。在给每个表视图它自己的 .xib 之后,崩溃就消失了。

于 2014-10-29T21:38:20.440 回答
1

对我来说,当我从模拟器运行一些视频编辑代码时,我遇到了 xpc api Misuse 崩溃!(iOS 13),问题不会出现在真实设备上。

于 2020-05-14T02:28:23.220 回答