Information Technology Reference
In-Depth Information
gestions may not fix code that isn't working. It's ideal for fixing various minor issues, but it isn't a comprehens-
ive teaching or training tool.
FIGURE 15.2
Using the Fix-It feature
NOTE
If Xcode can't suggest a Fix-It tip, it displays a short issue summary instead. Fix-It tips are only available for a sub-
set of all possible issues. Don't be surprised if Xcode doesn't offer one.
Using the Static Code Analyzer
Xcode 4 includes a Static Code Analyzer designed to flag deeper issues, such as errors in code logic and
memory management. It's particularly useful for the latter, and is very good at finding and highlighting code
that's likely to leak.
To analyze your code, select Product⇒Analyze in the main Xcode menu. Xcode builds the project and adds an
extra analysis pass. Issues are reported in the code and in the Issues navigator with blue highlights, as shown in
Figure 15.3. The highlighting is sophisticated enough to display execution logic and variable dependency
chains.
FIGURE 15.3
Issues appear with blue highlights.
Search WWH ::




Custom Search