Breaking Conditionally

Discussion in 'iOS Programming' started by teguh123, May 10, 2011.

  1. teguh123 macrumors member

    Mar 22, 2011
    A variable shouldn't be nil. Say it's nil. How do I break the program when it's nil?

    Debug assert? Objective c?
  2. chown33, May 10, 2011
    Last edited: May 10, 2011

    chown33 macrumors 604

    Aug 9, 2009
    on the Western Slopes, with E. A. Poe
  3. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    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.

Share This Page