為了防止自己忘記怎么操作旭从,特意記錄一下自己的操作流程
用Xcode自帶的 symbolicatecrash 工具來(lái)解析的.crash文件
step1:
獲取crash文件
step2:
找到app包所對(duì)應(yīng)的.dSYM文件客峭。
step3:
就是找到Xcode中的symbolicatecrash工具
終端執(zhí)行命令:
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
使用上面的第一個(gè)
step4:
將上面的三個(gè)東西都放在同一個(gè)文件下,然后cd到當(dāng)前目錄下
./symbolicatecrash ./MangoDemo.crash ./MangoDemo.dSYM > SymbolCrash.crash
``
執(zhí)行此命令可能會(huì)報(bào)錯(cuò)Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 69.徙鱼。執(zhí)行命令export DEVELOPER_DIR=/Applications/XCode.app/Contents/Developer即可。
``
Final:
最后在當(dāng)前文件夾下會(huì)生成一個(gè)新的crash分析文件,點(diǎn)進(jìn)去查看就行了圾叼。