An iOS device generates a crash log and saves it on the device when the APP exits. This log saves the stack trace of each thread that is executing at the moment of the crash. From this log, you can learn what each thread is doing when the APP exits and identify which thread the APP exits on. You can connect your iPhone to Xcode to export logs, or access Bugly and other exception reporting tools in your APP to obtain crash logs. The following is a Bugly – based crash log analysis method.

Below is the original crash log collected, with only the current stack address information

We need to symbolize the log file against the dSYM file

1. The dSYM file can be obtained as follows:

In Xcode, select Window, Organizer, right-click a version in Archives, select “Show in Finder”, continue to right-click the corresponding “Xcarchive” file, select “Show Package Contents”, and go to the dSYMs folder in the open directory. The following figure

2. Download Bugly iOS symbol table tool, which includes symbol table tool JAR package, Windows script, Shell script, etc.

Copy the dSYM file to the same directory as the tool JAR package and run the following command:

Java -jar buglySymbolios. jar -i File name. DSYMCopy the code

A zip file is generated and uploaded to the Bugly platform. The final result is as follows:

3. If the stack information is known and the dSYM file is obtained, the solution without Bugly platform is:

Right-click the dSYM file, select “Show package Contents”, select Contents, Resources, DWARF, and finally you will see a file named APP. Open terminal and run the following command:

The path to the file that Atos-o just found in DWARF, just drag it directly into Terminal-l 0x00000001029a0000 -arch arm64 0x0000000102d39650
Copy the code

4. If Rebuild From Bitcode is selected during the packaging process, after the above steps are executed, the symbolic crash log is as shown in the figure below:


Xcrun dsymutil-symbol -map File path /BCSymbolMaps dSYM file path / 64608820-427d-30ee-b350-bf97c9a5f3cd.dsymCopy the code

Then, perform Step 2 or Step 3.