Chapter 19

Using the Static Analyzer

When you build applications, most compilers can detect code that looks fishy and issue a warning, indicating code that might turn into a bug at runtime. In an effort to move beyond this kind of warning, a few years ago, Apple added a static analyzer to Xcode version 3.2. The static analyzer is a tool that logically examines your code without actually running it, looking for errors that can turn into bugs. In this chapter, we’ll take a look at how you can use the static analyzer to find problems in your code.

Getting Some Static

What does the static analyzer do? How does it work? The static analyzer knows a lot about how Objective-C programs are supposed to work, then checks your program against that knowledge. ...

Get Learn Objective-C on the Mac: For OS X and iOS, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.