O'Reilly logo

Xcode 5 Start to Finish: iOS and OS X Development by Fritz Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

30. Snippets

Xcode 5 Start to Finish relies mostly on narrative to take you on a tour of using Xcode for Cocoa development. I tried to cover as much as I could in the first three parts, and I mopped up the remaining big topics in the fourth. That leaves some small topics—tricks and traps—that didn’t fit anywhere else.

Tricks

General

• If you’re used to Unix or Linux development, you’re accustomed to global macros like NDEBUG and DEBUG, and expect them to be set for you automatically.

If the argument to the standard C assert() macro is zero, it halts the program. If NDEBUG is set, assert() does nothing, so you can publish code that may still exhibit the bug you put in the assertion for, but at least it won’t crash.

The NS BLOCK ASSERTIONS macro ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required