Can I use this string in release code?
NSAssert([entity buildEntity], @"Building failed at entity with id: %d", entity.entityId);
[entity buildEntity] returns BOOL and must be called.
So the question is: if I turn off assertion in release(default behavior of Xcode 4) then will blocks of code inside assertion be executed or not?
NO,
buildEntitywill not execute in release mode.Use below code, this will behave same in debug and release mode.