How to know if NSAssert is disabled in release builds?

前端 未结 7 749
长发绾君心
长发绾君心 2020-12-04 11:22

I often saw \"assert \" in iOS code, I google it, and got to know it assert true or false.

I want to know if this will auto disable in release mode?

7条回答
  •  猫巷女王i
    2020-12-04 11:59

    I will here provide a meta-answer:

    Both @CocoaFu and @dasblinkenlight are correct. NS_BLOCK_ASSERTIONS turns off NSAssert() and NDEBUG turns off assert(). You need both if you use both.

提交回复
热议问题