一、獲取crash文件
1、PLCrashReporter 收集crash,
stringValueForCrashReport: withTextFormat:用方法獲取crash信息。上傳到服務(wù)器。
或是配合CocoaLumberjack,將此信息寫入app本地緩存文件。
2、連接手機
導(dǎo)出crash日志
或是從服務(wù)器拿到上報的crash文件。
xcode-》window-》Devices-》選擇手機設(shè)備,View Device Logs-》選擇crash條右鍵,選擇Export Log-》xxxx.crash 保存到桌面。

二、獲取xxxx.app.dSYM文件
xcode-》product-》Archive
如果已經(jīng)打包了, xcode-》Window-》Oganizer-》右鍵選擇Show In Finder,顯示包內(nèi)容,進入dSYMs目錄,則可找到xxxx.app.dSYM文件

三、提取crash加密信息
find /Applications/Xcode.app/ -name symbolicatecrash -type f
cd /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/Library/PrivateFrameworks/DVTFoundation.framework
或是將symbolicatecrash拷貝桌面。
設(shè)置環(huán)境變量:
export DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer/'
./symbolicatecrash 1.crash xxxx.app.dSYM > 1out.txt
