IOS Crash File Analysis

Source: Internet
Author: User

When the IOS program encounters a crash condition in the real machine running program, the machine automatically generates a log file, which contains the running logic before the program crash, and analyzes the carsh file, it effectively solves the problem of the Program on the real machine and ensures the stability of the program. However, most of the crash files show the problematic addresses and system messages, unable to view the corresponding crash location in the program. The following article will help you solve this problem.

Analyze the cause of the crash. Three things are required: first, the crash file, second, symbolicatecrash, and third, dysm and app files.

0. Create a temporary folder on the desktop, such as crash

1. first, you need to export the crash file from the device. The simplest and most direct method is to connect the device to the Mac, open the xcode organizer, select the devices at the top of the device, and in the List on the left, the device information of the current connection is displayed. Select the device logs under the current device. Wait for a moment. A lot of panic information will appear in the middle list, sort by time to find the crash that has crashed recently, and right-click to export the file. the file name is automatically saved. crash file, like: xxx_2013-08-15-200743 _-iPad. crash: Upload the file to the Temporary Folder created in step 1 for backup.

2. symbolicatecrash is a tool that comes with xcode. To facilitate calling, you can make a shortcut to call it in any path.
First, enter find/applications/xcode. app-name symbolicatecrash-type F under termail to find the true location of symbolicatecrash,
Generally, the following path is returned:

/Applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/library/privateframeworks/dtdevicekit. Framework/versions/A/resources/symbolicatecrash

Next, create a shortcut
Sudo ln-s "/applications/xcode. APP/contents/developer/platforms/iphoneos. platform/developer/library/privateframeworks/dtdevicekit. framework/versions/A/resources/symbolicatecrash "/usr/local/bin/symbolicatecrash

3. the dysm file exists on the machine where the last package is sent. Open the xcode organizer and select archives on the top to view the final package sending record. Select distriive and save it as the corresponding archive file to view the package content, there is what we need. dsym File

The app file is saved as an IPA file in the same way. Change the file name extension to zip. After decompression, you can obtain the final app file. Upload the two files to the Temporary Folder created in step 1 for backup.

Everything is ready, except the last step. In termail, enter the Temporary Folder created in step 1,

Run the symbolicatecrash XXXX. Crash XXXX. dsym> crash. Text command to save the last analyzed file to the crash. text file.

Like symbolicatecrash xxx_2013-08-15-200743_iPad.crash XXXX. App. dsym> crash. Text

Note: In general, the first use of symbolicatecrash will generate an error, the following error message

Error: "cmd_dir" is not defined at/usr/local/bin/symbolicatecrash line 53.

The solution is to enter export _dir = "/applications/xcode. APP/contents/Developer

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.