avatar

symbolicatecrash 分析iOS Crash文件

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/
文章作者: 新风作浪
文章链接: http://duxinfeng.com/2015/08/18/symbolicatecrash/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 新风作浪

评论