Until Xcode 5, Release builds could be prevented from including NSAssert
statements and their variants, using the default Build Setting:
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
This setting can be found in project.pbxproj
and is set in Xcode here:
(Note that this grab was taken from an Xcode 4 project converted to Xcode 5.)
Each target would inherit this setting in the Release build only. Obviously this was a good thing. Rather than crash immediately, the app would possibly struggle on regardless. Whereas for Debug builds, you want to know immediately when an NSAssert
fails.
However, I am struggling to find the equivalent in Xcode 5.
Creating a new project using the default templates shows no equivalent setting:
My question is, what is the equivalent setting in Xcode 5, or does NS_BLOCK_ASSERTIONS
have to be added manually to Other C Flags
for the Release build?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…