I received a big iOS project, in this project every NSAssert()
are skipped even in debug!
I added a test to check is NS_BLOCK_ASSERTIONS
is defined even in debug mode and no, it isn't defined.
#ifdef NS_BLOCK_ASSERTION
NSLog(@"Assertion are blocked");
#endif
Old C-style assert()
are called as usual.
This code:
NSLog(@"AA");
NSAssert(FALSE,@"TRY ASSERT");
NSLog(@"BB");
produce this preprocessed code
if (!(0)) {
[[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd
object:self
file:[NSString stringWithUTF8String:"/Users/..../AppDelegate.m"]
lineNumber:106
description:(@"TRY ASSERT")];
}
and i correct my post, NSAssert aren't skipped, but the app simply hangs, even if the NSAssert are TRUE :(