iOS审核 Exception Type: EXC_CRASH (SIGKILL)

这两天上传审核遇到点麻烦,打开app加载超时被看门狗kill了,此文记录自己采坑并解决重新审核通过的经历,以下是苹果反馈的问题:

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: application:7344 exhausted real (wall clock) time allowance of 19.40 seconds | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 15.850 (user 15.850, system 0.000), 13% CPU", | "Elapsed application CPU time (seconds): 0.297, 0% CPU" | )
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001a73857e4 0x1a735e000 + 161764
1   libsystem_platform.dylib        0x00000001a729f008 0x1a729b000 + 16392
2   CoreFoundation                  0x00000001a7472674 0x1a746c000 + 26228
3   CoreFoundation                  0x00000001a75d4d0c 0x1a746c000 + 1477900
4   CoreFoundation                  0x00000001a7504128 0x1a746c000 + 622888
5   CoreFoundation                  0x00000001a7503970 0x1a746c000 + 620912
6   CoreFoundation                  0x00000001a747058c 0x1a746c000 + 17804
7   CoreFoundation                  0x00000001a7470ea8 0x1a746c000 + 20136
8   CoreFoundation                  0x00000001a75d763c 0x1a746c000 + 1488444
9   Foundation                      0x00000001a785c628 0x1a7855000 + 30248
10  ZJB-New                         0x00000001010de9e4 0x100bd0000 + 5302756
11  ZJB-New                         0x00000001010c21d4 0x100bd0000 + 5186004

问题提示就是启动后主线程加载时间过长,被看门口给杀了。现在我们要找到启动后是什么问题导致加载过长,但面对这些地址符号如何解析呢?
下面介绍一种方法:symbolicatecrash
该方法要用到三个文件
1: dSYM文件----该文件你可以在Xcode->window->organizer里面找到你上次上传到App Store的包然后右键 show In Finder,然后找到该文件再右键显示包内容->找到dSYMs文件夹->找到XXX.app.dSYM文件。
2.crash文件(把苹果发给你的.txt文件,保存到本地,后缀是.crash)
3.symbolicatecrash工具(终端输入 find /Applications/Xcode.app -name symbolicatecrash -type f获取列表,然后复制含有DVTFoundation的路径,然后前往文件夹copy出来)把这三个东东放在同一个文件夹
然后
打开终端,cd到文件夹,执行

./symbolicatecrash ./5CFEEB3F-8FA3-4522-B0E2-303B0200799A.crash ./xxx.app.dSYM > symbol.crash

如果出现

Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 69.

则先执行

export DEVELOPER_DIR=/Applications/XCode.app/Contents/Developer

再执行

 ./symbolicatecrash ./5CFEEB3F-8FA3-4522-B0E2-303B0200799A.crash ./xxx.app.dSYM > symbol.crash

通过后文件夹就会出现一份symbol.crash文件,里面就是你想要的了
crash.png

打开symbol.crash文件


crash2.png

发现是友盟的当前sdk版本在初始化参数时阻塞了主线程(或许是偶发的情况,因为平时在测试没有发现),随后果断更新到最新的SDK。
最后,优化App的启动时间也有很多文章也提供了很多方式,这些都需要平时多多注意。

你可能感兴趣的:(iOS审核 Exception Type: EXC_CRASH (SIGKILL))