symbolicatecrash 分析iOS Crash文件

2018.1.13更新:

审核的时候如果是因为崩溃被拒,审核人员会在回复的邮件中附上crash信息(txt文件格式),下载这个文件开始对它进行分析,查看源码崩溃的具体位置。

新建Crash文件夹,把分析工具symbolicatecrash 、崩溃日志crash.txt.dSYM文件放到这个文件下,打开中断进入个目录,执行

./symbolicatecrash ./crash.txt ./MyAppName.app.dSYM > crash.log

在crash.log中查看崩溃的具体信息。

获取symbolicatecrash 文件:

find /Applications/Xcode.app -name symbolicatecrash -type f

结果:

/Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework/symbolicatecrash
/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash

/Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash中找到symbolicatecrash 复制过来

如果报错Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 69. 回到终端上执行:

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