IOS. Crash File Analysis Solution (using symbolicatecrash tool ),

Source: Internet
Author: User

IOS. Crash File Analysis Solution (using symbolicatecrash tool ),

Crash Analysis Method: parse the Crash file through command lines

Three files are required to parse the Crash file using the command line tool provided by Mac.

  • Symbolicatecrash is a crash analysis tool that comes with Xcode. This tool can be used to locate the crash more accurately and replace the address starting with 0x with the response code and the number of lines.
  • The dSYM file generated during packaging.
  • Crash files generated during Crash.
1. Get the. crash File

How to obtain the crash information:

  • Use third-party crash statistical tools such as umeng and dandelion. -> Analysis of third-party crash statistics of iOS umeng-dSYM
  • Collect application crashes and upload them to the server.
  • View the crash information of a device in Xcode-Devices.
  • Use the Crash collection service provided by Apple.

This article uses only the fourth method-review the. crash file rejected to me. It will be discussed later in other ways.

2. Obtain the. app and. app. dSYM files. Step 2.1:

1. in Xcode-Window-Organize, find the corresponding Archives you want to check and find App-right-click-Show in Finder.

2. Right-click the. xcarchive file and choose "show Package content ".

3. Copy **. app. put the dSYM file and the app file in the Products-> Applications folder. the crash file is in the crash folder (created by the folder itself ).

2.2 Introduction to dSYM symbolic set:
  • The symbolic set is a file with the same suffix as. dSYM as the. app file after we pack the ipa file. This file must be packaged using Xcode.
  • Each. dSYM file has a UUID, which corresponds to the uuid in the. app file, representing an application. Each crash message in the. dSYM file also has a separate UUID, which is used to verify the UUID of the program.
  • If we do not use the. dSYM file, the crash information is inaccurate.
  • Symbols store information about file names, method names, and row numbers in a centralized manner. They correspond to the hexadecimal function addresses of executable files and crash through analysis. the Crash file can accurately know the specific Crash information.

When the program crashes, we can get the crashed error stack, but this error stack is a hexadecimal address starting with 0x. We need to use the symbolicatecrash tool that comes with Xcode. crash and. the dSYM file is symbolic to obtain detailed crash information.

3. Get the symbolicatecrash Tool

1. Open the terminal and enter the following command:

Find/Applications/Xcode. app-name symbolicatecrash-type f I found:/Applications/Xcode. app/Contents/SharedFrameworks/DVTFoundation. framework/Versions/A/Resources/symbolicatecrash

2. Run the command to copy symbolicatecrash to the desktop's crash folder and put it together with. app and. app. dSYM.

cp /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash /Users/***/Desktop/crash
4. Start the command line to parse the Crash file.

1. Open the terminal and use commands to switch to the desktop's crash directory:

cd /Users/***/Desktop/crash

2. execute commands

. /Symbolicatecrash/Users/***/Desktop/crash /*. crash/Users/***/Desktop/crash /*. app. dSYM> jieguo. crash2.1. If the preceding command fails, you need to use the following command to set the exported environment variables and repeat the above parsed operations. Export cmd_dir =/Applications/XCode. app/Contents/Developer

3. A new. Crash file will be generated after the parsing is completed, which contains the Crash details.

After resolution

The information obtained using third-party crash statistics tools such as umeng and dandelion can be parsed using the following method-dSYM

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.