iOS symbolicatecrash工具的使用(查看崩溃日志)
一、在桌面创建一个crash文件夹
1.Xcoe-Window-Organize找到Archives找到App-右击-Show in Finder
[attachment=63032]
2.复制.app和.app.dSYM到crash夹文件:右击..xcarchive文件-显示包内容
如图:
[attachment=63033]
[attachment=63034]
[attachment=63035]
复制好以后如图:
[attachment=63036]
二、首先找到symbolicatecrash工具存放的地址
1.打开终端输入以下命令:
find /Applications/Xcode.app -name symbolicatecrash -type f
你会找到:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/./symbolicatecrash
2.用命令将symbolicatecrash拷贝到桌面的crash文件夹里面,与.app和.app.dSYM放一起
cp /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash /Users/angel/Desktop/crash
如图:
[attachment=63037]
3.将Crash文件也拷到当前文件夹里面
如图:
[attachment=63038]
三、执行symbolicatecrash
1.打开终端用命令切换到桌面的crash目录下:
cd /Users/你的电脑名称/Desktop/crash
2.执行命令
./symbolicatecrash /Users/angelseahappiness/Desktop/crash/Control_2014-01-13-111838_Lynns-iPad3.crash /Users/angel/Desktop/crash/Control.app.dSYM > Control_symbol.crash
这时候终端有可能会出现:Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 60.
3.输入命令:export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer"
4.再执行./symbolicatecrash /Users/angelseahappiness/Desktop/crash/Control_2014-01-13-111838_Lynns-iPad3.crash /Users/angel/Desktop/crash/Control.app.dSYM > Control_symbol.crash
这时候终端将会进行处理了
5.将终端完成以后,在crash文件夹里面会多出一个文件Control_symbol.crash:这个就是最终的文件,可以查看bug所在的
如图:
[attachment=63039]
原文连接:http://www.cocoachina.com/bbs/simple/?t180736.html