Does the NS_BLOCK_ASSERTIONS disable both NSAssert and assert() calls?

ios, iphone, objective-c

Solution

No, `assert()` is controlled with the `NDEBUG` symbol:

#ifdef NDEBUG
#define assert(e)   ((void)0)
#else
...

(see `/usr/include/assert.h` if you have the Xcode Command Line Tools installed, or elsewhere in the Xcode.app bundle, if not).

Problem

Does the `NS_BLOCK_ASSERTIONS` switch off just the `NSAssert` calls or also the `assert()` calls. My app crashes in the Release mode on the line with `assert(...)` statement. The documentation says only about `NSAssert` and does not tell if `assert()` calls are being disabled. There are a couple questions related to mine that are not answering it. I'm linking them here: NS_BLOCK_ASSERTIONS in Objective-C NSAssert vs. assert: Which do you use, and when? How to know if NSAssert is disabled in release builds?

Original source

Related problems