symbolicatecrash 分析iOS Crash文件

Author Avatar
新风作浪 8月 18, 2015
  • 在其它设备中阅读本文章

2018.1.13更新:

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

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

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

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

获取symbolicatecrash文件:

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

结果:

1
2
3
4
/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. 回到终端上执行:

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