White box 1:ios static code scan

Source: Internet
Author: User

Static scan

Static Analysis

1, can be in the coding phase, the development of self-code inspection. Early detection of code pitfalls.

2, directly analyze the source code to find errors in the program, without the need to actually run.

3. Automatic detection of bugs in objective-c programs, memory leaks and other problems.

4. The sooner the memory problem is discovered, the smaller the cost of the solution.


Static Scan method : Xcode integration Tool

Under Xcode, for a project, click Product--analyze on the menu bar;

650) this.width=650; "src=" Http://note.youdao.com/yws/res/392/FE702D4198FD4EBAAB7D90B0E613A1E4 "alt=" Image_ 20151103173740.png "style=" border:0px; "/>

Scan Results Analysis

Scan results include warning and error list, you can click in the prompt to see the corresponding suspicious code;

650) this.width=650; "src=" http://note.youdao.com/yws/res/396/A502DC5886D1401893F426C2CD1DD7E0 "alt=" unnamed. png " Style= "border:0px;"/>

Problem classification:

Dead Store

Memory

Memory Error

Core Foundation

Logic Error

API Misuse

Points to focus on:

Memory------the point of leakage;

Static Scan Usage Scenarios:

1, in the development of the coding stage, the direct analysis of the source code to find errors in the program, without the need to actually run, early detection of hidden code.

2, test in the smoke test can be scanned first, error too much code modification too large cases can be temporarily not involved in testing, so as not to cause rework.


White box 1:ios static code scan

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.