Breaking Conditionally

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

  1. macrumors member

    Joined:
    Mar 22, 2011
    #1
    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

    macrumors 603

    Joined:
    Aug 9, 2009
  3. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    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