1.需要发布代码的 对应 app和.dSYM
位置Xcode4.5.2 通常在/User/<用户名>/Developer/Xcode/Archives/目录下 找到对应的应用 显示包内容,将其中的
应用和.dSYM
(例如我的应用名称为:guola)
guola.app 和对应guola.dSYM 复制到桌面上。
2.将工具从/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Resources/symbolicatecrash 复制到桌面。
打开终端使用命令复制
GL:~/Desktop/$cp /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Resources/symbolicatecrash ./
3.使用GL:~/Desktop/$./symbolicatecrash guola.crash guola.dSYM>new_symbol.crash
Incident Identifier: 60CB1AEF-9D5D-4774-8ACC-CA7010529B78
Hardware Model: iPhone2,1
Process: VPathHunt [545]
Path: /var/mobile/Applications/2707927C-587A-4FD7-BA1C-691A016563FB/VPathHunt.app/VPathHunt
Identifier: VPathHunt
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2012-11-10 16:28:18.382 +0800
OS Version: iOS 6.0.1 (10A523)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x32e1429e __exceptionPreprocess + 158
1 libobjc.A.dylib 0x3a1a197a objc_exception_throw + 26
2 CoreFoundation 0x32e141c0 +[NSException raise:format:] + 100
3 CoreFoundation 0x32de373a mutateError + 102
4 VPathHunt 0x000a91a0 __30-[MainViewController getlift:]_block_invoke_0 (MainViewController.m:612)
5 VPathHunt 0x000afc42 __block_global_3 (AFJSONRequestOperation.m:129)
6 libdispatch.dylib 0x3450611a _dispatch_call_block_and_release + 6
7 libdispatch.dylib 0x345054b2 _dispatch_client_callout + 18
8 libdispatch.dylib 0x34506dc6 _dispatch_main_queue_callback_4CF$VARIANT$up + 222
9 CoreFoundation 0x32de7f36 __CFRunLoopRun + 1286
10 CoreFoundation 0x32d5aeb8 CFRunLoopRunSpecific + 352
11 CoreFoundation 0x32d5ad44 CFRunLoopRunInMode + 100
12 GraphicsServices 0x37d772e6 GSEventRunModal + 70
13 UIKit 0x330492f4 UIApplicationMain + 1116
14 VPathHunt 0x0009a3ca main (main.m:16)
15 VPathHunt 0x0009a364 start + 36
备注如果命令行下执行 symbolicatecrash 出现 Error:"DEVELOPER_DIR"isnotdefined at /Applications/Xcode.app/[snip]Resources/symbolicatecrash line 53 提示
在命令下执行
GL:~/Desktop/Test/crash$export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer"
即可。
还可以参考
http://ios-iphone.diandian.com/post/2012-05-18/19440182