Appendix B. Common Beginner Xcode Compiler Errors

When you’ve programmed in an environment for a while, you get to know the common errors and instinctively know what to look for in the code. Making the transition to a new environment means you may have to ignore all your previous experience and learn an entirely new vocabulary for error messages. And if you’re moving from a loosely typed environment such as JavaScript to a language that is much more strongly typed, the error messages may not give you a sufficient clue about what’s wrong. Even more potentially confusing is that a coding error in a header file may be exposed only when the compiler processes its companion implementation file. As the number of class files grows, you’ll need Xcode’s help more and more to find the file in which an error appears. Notice that an error displays a brief notice at the bottom right corner of any window you have open for the project. Click the icon to bring the Build Results window into view. There you’ll find specific references to files and locations of errors. This appendix lists the compile-time error messages you are likely to encounter as you get acquainted with Objective-C, Xcode, and the Cocoa Touch frameworks.

You will soon learn that Xcode presents two types of messages: warnings and errors. Warnings do not prevent an app from compiling. That said, warnings are not necessarily harmless. They are advance signs that something is not right in your code. The app may compile and launch in ...

Get Learning the iOS 4 SDK for JavaScript Programmers now with O’Reilly online learning.

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