When the app crashes, a crash log appears in the Xcode device interface, probably like this:
Incident Identifier:fbf87174-405d-4f1c-a745-e3d9f7858f4fcrashreporter Key: 31da19c0a9879bc6ca613ad7611c14ccebe2a82dhardware model:iphone4,1process:myproj [285]Path:/var/m Obile/applications/c6e9af9c-acf3-4c8d-8623-dc432cbcf1ab/myproj.app/myprojidentifier:myprojversion:??? (???) Code type:arm (Native) Parent process:launchd [1]date/time:2014-09-30 17:09:08.491 +0800os Version:io S 6.1.3 (10b329) Report version:104exception Type:exc_crash (SIGABRT) Exception codes:0x0000000000000000, 0x00000000000 00000Crashed thread:0last Exception backtrace:0 Corefoundation 0x323ed29e 0x3232b000 + 7952941 LIBOBJC. A.dylib 0x3a11597a 0x3a10d000 + 351942 corefoundation 0x323ed1c0 0x3232b000 + 7950723 MyP Roj 0x0065732c 0x4000 + 66322364 libsystem_c.dylib 0x3a593e86 0x3a55b000 + 2330945 WebCore 0x3851d6be 0x3833d000 + 19678066 WebCore 0x3851d6be 0x3833d000 + 19678067 webcore 0x383c5eb8 0x3833d000 + 5608248 We Bcore 0x383c4f60 0x3833d000 + 5568969 webcore 0x383c4de4 0x3833d000 + 556516 Ten WebCore 0x383c4db6 0x3833d000 + 55647011 webcore 0x383a6a1e 0x3833d000 + 43267012 webcore 0x383a69d4 0x3833d000 + 43259613 webcore 0x383a69f0 0x3833d + 43262414 WebCore 0x383a69d4 0x3833d000 + 43259615 webcore 0x383a69f0 0 x3833d000 + 43262416 WebCore 0x383a69d4 0x3833d000 + 43259617 WebCore 0x383a 69f0 0x3833d000 + 43262418 webcore 0x383a69d4 0x3833d000 + 43259619 WebCore 0x383a69f0 0x3833d000 + 43262420 webcore 0x383a69d4 0x3833d000 + 43259621 WebCore 0x383a69f0 0x3833d+ 43262422 WebCore 0x383a69d4 0x3833d000 + 43259623 webcore 0x383a69f0 0 x3833d000 + 43262424 WebCore 0x383a69d4 0x3833d000 + 43259625 WebCore 0x383a 69f0 0x3833d000 + 43262426 webcore 0x383a69d4 0x3833d000 + 43259627 WebCore 0x383a69f0 0x3833d000 + 43262428 webcore 0x383a69d4 0x3833d000 + 43259629 WebCore 0x383a69f0 0x3833d000 + 43262430 webcore 0x383a69d4 0x3833d000 + 43259631 WebCore 0x383a69f0 0x3833d000 + 43262432 webcore 0x383c4a4a 0x3833d000 + 55559433 WebCore 0X3835C12A 0x3833d000 + 12727434 webcore 0x385aa944 0x3833d000 + 254598835 Webki T 0x38cf2614 0x38c6d000 + 54632436 webcore 0x38349d30 0x3833d000 + 5252837 Corefoundation 0x323c267e 0x3232b000 + 62015838 corefoundation 0x323c1f7a 0x3232b000 + 61836239 corefoundation 0X323C0CB2 0x3232b000 + 61355440 corefoundation 0x32333eb8 0x3232b000 + 3653641 Corefoundatio N 0x32333d44 0x3232b000 + 3616442 webcore 0x38347500 0x3833d000 + 4224043 Libsystem _c.dylib 0x3a56c30c 0x3a55b000 + 7041244 libsystem_c.dylib 0x3a56c1d4 0x3a55b000 + 70100Thread 0 Name:dispatch queue:com.apple.main-threadthread 0 crashed:0 libsystem_kernel.dylib 0x3a613350 0x3a602000 + 704 801 Libsystem_c.dylib 0x3a58a11e 0x3a55b000 + 1927982 libsystem_c.dylib 0x3a5c696e 0x3a55b000 + 4406863 libc++abi.dylib 0x39b64d4a 0x39b61000 + 156904 libc++abi.dylib 0x39b61ff4 0x39b6 + 40845 LIBOBJC. A.dylib 0x3a115a74 0x3a10d000 + 354446 libc++abi.dylib 0x39b62078 0x39b61000 + 42167 libc+ +Abi.dylib 0x39b62110 0x39b61000 + 43688 libc++abi.dylib 0x39b63594 0x39b61000 + 96209 Libo Bjc. A.dylib 0x3a1159cc 0x3a10d000 + 3527610 corefoundation 0x32333f1c 0x3232b000 + 3663611 Core Foundation 0x32333d44 0x3232b000 + 3616412 graphicsservices 0x35f0c2e6 0x35f07000 + 2122213 UIKit 0X342492FC 0x341f2000 + 35711614 MyProj 0x00054b9a 0x4000 + 33065015 MyProj 0x00009884 0x4000 + 22660Thread 1 name:dispatch queue:com.apple.libdispatch-managerthread 1:0 libsyst Em_kernel.dylib 0x3a603648 0x3a602000 + 57041 libdispatch.dylib 0x3a533974 0x3a52b000 + 351882 libd Ispatch.dylib 0x3a533654 0x3a52b000 + 34388Thread 0 crashed with ARM Thread State (32-bit): r0:0x00000000 r1:0x00000000 r2:0x00000000 r3:0x3c0dc534 r4:0x00000006 r5:0x3c0dcb88 r6:0x00eaf164 R7: 0X2FDFFA14 r8:0x00eaf140 r9:0x00000400 r10:0xffffffff r11:0x00000005 ip:0x00000148 sp:0x2fdffa08 lr:0x3a58a12 3 pc:0x3a613350 cpsr:0x00080010binary images:0x4000-0x853fff +myproj armv7 <3559CE647EDA37A9A26F9AECBF 7b6923>/VAR/MOBILE/APPLICATIONS/C6E9AF9C-ACF3-4C8D-8623-DC432CBCF1AB/MYPROJ.APP/MYPROJ0X2FE22000-0X2FE42FFF Dyld armv7 <280610df5ed43ec7aa00629a27009302>/usr/lib/dyld0x31321000-0x313f2fff rawcamera armv7 <8752cce31 E8e3ceab5d88c84e3481db2>/system/library/coreservices/rawcamera.bundle/rawcamera
Sometimes the log will give a detailed class and method name, but sometimes given is like this binary type of things, we need to manually convert it to be able to understand the class and method name, known as the symbolic.
One thing to note is that the crash log,. App packages and. dsym files are strictly correspondence, a crash log only and corresponding. The app package and. dsym files are only able to be symbolized when they are together, so it is a good idea to keep the corresponding. archiver file when the application is packaged.
1:. Access to app packages and. dsym files
This is relatively simple, in correspondence. Arciver file Inside, click "Show Package Content", you can directly see these two files, copy to other places to spare.
After the. dsym file is copied out, there is also a myproj file in. dSYM, also copied out for backup.
2: How to view logs,. The correspondence between app packages and. dsym files
Open the terminal and enter. The directory where the app and. dsym files are located, enter the following command:
$ dwarfdump-u Myproj.app/myproj
You can see the myproj.app corresponding UUID
If you enter a command
$ dwarfdump-u MyProj
You can view the UUID for the. dsym file.
Locate the first line of the binary images line of the crash log, and the circle behind your project name with angle brackets is the corresponding UUID of the log file, and the two UUID must correspond to it.
3: Manually symbolize log files with Atos
Navigate to. The directory where the app and. dsym files are located, open terminal, enter:
Xcrun atos-arch Armv7-o MyProj 0xXXXXXXXX (address you want to resolve)
The address mentioned here is
3 MyProj 0x0065732c 0x4000 + 6632236
Log files The 0x0065732c,atos in this line can be translated directly into a readable class name and method name through the. dsym file.
Analyzing iOS crash logs with Atos