Chapter 3. Xcode
When programming for Mac OS X you spend most of your time in Xcode. Xcode is an Integrated Development Environment, or IDE, meaning that Xcode provides all the tools you need to write, build, and debug Mac OS X programs in a single application.
Xcode's text editing tools are specifically designed for writing computer programs. Source code is typically displayed in a small monospaced font so that programmers can tell at a glance if their code is formatted properly. In addition, source code can be color-coded so that specific parts of the program stand out. For example, comments that aren't compiled into your program may appear in a different color from the rest of the code.
Xcode also provides tools for building your source code in easy reach. You can easily change your build settings to adapt to different situations, such as testing or deploying your program. If for some reason your code will not compile, Xcode displays the list of errors encountered in the build process and allows you to fix your mistakes.
After your code has compiled into the final application, you can launch the program directly from Xcode. If the program doesn't work right, or if it crashes, you can diagnose the problem using Xcode's built-in debugger. The debugger allows you to walk through your program line by line and examine the state of your program's variables as it runs.
During the development process, you may find yourself checking and double-checking the developer documentation on ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access