ios-Capturing application crash logs

Source: Internet
Author: User
Tags stack trace

As an iOS mobile app developer, to make sure your app is correct, you're sure to do a lot of testing before submitting the app to the store, and the app works fine during your testing, but after the app store goes online, there are users complaining that the app will "flash back"! Now as the developer of the application you will certainly be ready to open the code ready to fix the "flashback" problem, but at this point you will find out exactly that code? The problem of that place ... This time the iOS crash log comes in handy, so now we're going to look at how to get a log of app crashes and trace from log to code.

(a) What is a crash log and where to get it:

When an app on an iOS device is on the blink, the operating system generates a crash report, also known as a crash log, on the device, and there's a lot of useful information on the crash log, including when the app is out of the picture. Typically, there is full stack trace information for each executing thread, so you can learn what each thread is doing when the flashback occurs, and tell which thread the flashback occurred on.

(ii) Several ways to get the crash log:

1. When the user complains about the flashback, you can ask him to sync the device with itunes, and when the device syncs with the itunes Store on the computer, the crash log will be saved on the computer (path: Mac OS x:~/library/logs/crashreporter/mobiledevice/ ) Download the crash log to the above location and send it to you by e-mail; When you use this method to get the crash log, you must try to get all the crash logs generated by the user device. Because the more crash logs, the more likely you are to diagnose the problem.

2. If you have Xcode, you can easily get a crash log from your device via Xcode, connect your iOS device to your computer, then turn on Xcode, choose the Window menu from the menu bar, and choose  organizer (shortcut is shift-cmd-2) on the Organizer window, select  devices  tab bar , ;library device Logs is a log of all your devices (which have been connected to Xcode), and the device Logs under each device is the log for the corresponding devices.

manage Your applications Click on the app and click the below the app icon. view Details button, then click on the right column Links part of the  crash reports; if there is no crash log, try clicking refresh button to refresh a bit. If you don't have a lot of app users, or you're just out of stock, there may not be any crash logs on your ITunes connect account, and if you do, you'll see crash information for different iOS versions of users.

4, use the tool to get the application crash log, now small to recommend a good tool (name: bugly, Website: http://bugly.qq.com/) Official online by the detailed explanation, also attached to the demo, small series will not be explained;

5. iphone Crash Log analysis tool Symbolicatecrash;symbolicatecrash is an analysis tool that comes with Xcode, You can use the crash log on the machine and the application's. dsym file to locate the location where the crash occurred, and replace the address in the crash log with the appropriate location for the code (see details: http://www.cnblogs.com/ydhliphonedev/archive/2012/ 12/07/2806866.html);

(c) Under what circumstances a crash log is generated:

1. User violation of operating system rules:

Violating IOS rules includes watchdog timeouts on startup, recovery, suspend, exit, user forced exit, and low memory termination.

2. There are bugs in the application:

At this point, you will think, the bug app will also upload the App Store success? The small part of the understanding is that some of the potential bugs in the application may be caused by the iOS system update after the bug, just think IOS8-iOS9 after Apple silently changed the HTTP to HTTPS.


ios-Capturing application crash logs

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.