View Full Version : Breaking Conditionally
May 10, 2011, 12:48 PM
A variable shouldn't be nil. Say it's nil. How do I break the program when it's nil?
Debug assert? Objective c?
May 10, 2011, 01:00 PM
C assertions should work.
Also look up NSAssert.
FWIW, google search terms: ios assert site:developer.apple.com
And see this:
May 10, 2011, 01:22 PM
I don't believe that the issue mentioned in the "NSAssert considered harmful" blog post applies on iOS. It does, kind of, on MacOS X.
I use NSAssert in both Mac and iOS code and it works as expected. I believe this is what OP should use.