You have to know that in the Xcode7. Burst Commissioning Divine Skill

Source: Internet
Author: User

Transferred from: http://www.cocoachina.com/ios/20151020/13794.html

Xcode7 Apple has added two important debug-related features to us. After understanding it is very practical, introduced to everyone.

1.Address sanitizer: Mommy doesn't have to worry about exc_bad_access anymore?

Exc_bad_access has been a nightmare for many developers, because this error is not intuitive and often takes a long time to locate errors. Apple has brought a revolutionary boost this time.

Under scheme in the project, under Diagnostics, select Enable Address sanitizer (note that Xcode will recompile the entire project when selected).

After this setting, if a similar error occurs again, there will be a more detailed error message and even a display of memory usage.

2. Post-release crash tracking to easily locate crash codes

After upgrading iOS9, Apple will ask the user if they agree to collect app crash reports. This allows you to see some of the collected data in the background statistics of itunes Connect (usually a significant portion of the user disagrees, so it's only part of the data).

2.1 Viewing Crash statistics

Select App Analytics in the Connect background

After entering the Analysis page, tab, select "Metrics"

Then select "Crash" in the menu on the left

So you can see the crash statistics that Apple collects, so be sure to note that this is only part of the data, for example if you see a crash that is 10 times, but maybe Apple only collects 20% of the user's information. So you can probably estimate that it should be 10*5=50 times to crash.

2.2 Viewing specific crash information in Xcode

Select Organizer Under Window in the Xcode menu, select Crashes in the Open window, and Xcode will start downloading the relevant crash information to the local (it may take some time when the network environment is bad).

Organizer window

You can select the release version on the left that you want to view the crash information

In the Crash information column, the Apple will sort by the number of crashes, and the number of crashes is the top. The details on the right show the call stack at the time of the crash, and you can see what line of code is causing the crash.

When you select the crash you want to resolve, you can select Open in Project on the right side of the window.

The magical thing happened!!! In an open project, you navigate directly to the line of code that crashed. This greatly improves the efficiency of commissioning! I can't wait to share this joy with my colleague who is developing Android.

Attention! Attention!

Because the previous project was released without Xcode7 packaging, the Guess symbol table might not have been uploaded to the Apple server, so the previous project might not be able to directly display what line of code, but instead show the memory address where the call was made. However, you can see the next version when you post it with Xcode.

After this crash is resolved, it can be marked as resolved. There are two places to mark.

RELATED links:

What ' s new in Xcode

So I did not upgrade xcode7 students hastened to rise. O (∩_∩) o~

You have to know that in the Xcode7. Burst Commissioning Divine Skill

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.