IOS development diary 35-Xcode7 debugging magic, ios35-xcode7

Source: Internet
Author: User

IOS development diary 35-Xcode7 debugging magic, ios35-xcode7

Today, the blogger has a need to upgrade Xcode7 and encountered some difficulties. I would like to share with you the hope to make common progress.

1. Address Sanitizer: no longer need to worry about EXC_BAD_ACCESS

EXC_BAD_ACCESS has always been a nightmare for many developers, because this error is not intuitive and often takes a long time to locate the error. Apple has brought about revolutionary improvements this time.

Under Diagnostics in the Scheme of the project, select enable address sanitizer (note that Xcode will recompile the entire project after selection ).

After this setting, if a similar error occurs again, a more detailed error message will be prompted, and even the memory usage will be displayed.

2. crash tracking after release to easily locate the crash code

After iOS9 is upgraded, Apple will ask the user if they agree to collect the application crash report. In this way, you can see some collected data in the background statistics of itunes connect (a considerable number of users usually disagree, so only part of the data ).

2.1 view crash statistics

Select app Analysis in the connect background

On the Analysis page, select "metrics" in the tab"

Select "crash" in the menu on the left"

In this way, we can see the crash statistics collected by Apple,Be sure to note that this is only part of the dataFor example, if you see 10 crashes, but Apple may only collect 20% of user information. So you can probably estimate that it should be 10*5 = 50 crashes.

2.2 view the specific crash information in Xcode

Select organizer under the window in the xcode menu, and select Crashes in the window that opens, in this way, Xcode starts to download the relevant crash information to the local machine (it may take some time if the network environment is poor ).


Organizer window

You can select the release version on the left to view the crash information.

 

In the crash information column, Apple sorts the number of crashes by the maximum number of crashes. The detailed information on the right shows the call stack when the crash occurs. You can see which line of code causes the crash.

After selecting the crash to be resolved, you can select open in project on the right side of the window.

Something amazing happened !!!In the open project, the line of code that crashed will be located directly. This greatly improves the debugging efficiency! I can't wait to share this joy with my colleagues who developed android.

Note! Note!

Because xcode7 is not used for packaging during the previous project releaseGuessThe symbol table may not be uploaded to the Apple Server. Therefore, the previous project may not directly display the line of code, but the memory address with an error during the call. However, you can see it in the next version after using xcode.

After resolving this crash, you can mark it as resolved. There are two places to mark.

So if you haven't upgraded xcode7, hurry up. O (distinct _ distinct) O ~

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.