一. 验证xxx.crash、xxx.app和xxx.dSYM的uuid是否一致
验证方法:
1)查看xxx.app的uuid : dwarfdump --uuid xxx.app/xxx
$ dwarfdump --uuid mobileguard.app/mobileguard
2)查看xxx.dSYM的uuid : dwarfdump --uuid xxx.app.dSYM/Contents/Resources/DWARF/xxx
$ dwarfdump --uuid mobileguard.app.dSYM/Contents/Resources/DWARF/mobileguard
3)xxx.crash 里包含 uuid
对应的app和dSYM文件在后缀为.archive的文件中,可以从Xcode > Organizer > Archive 下找到对应的Archive包。
二. 确保三者uuid一致,用symbolicatecrash工具生成符号化日志
1)链接symbollicatecrash到/usr/bin/中,就可以直接使用sybollicatecrash命令:
ln -s /Applications/Xcode.app/... /symbolicatecrash /usr/bin/symbolicatecrash
$ ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash /usr/bin/symbolicatecrash
2)设置xcode DEVELOPER_DIR:
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
3)执行命令: