3
NS_BLOCK_ASSERTIONS
是否關閉了呼叫:NSAssert
調用或者還有assert()
調用。我的應用在assert(...)
聲明中的發行模式下崩潰。NS_BLOCK_ASSERTIONS是否禁用NSAssert和assert()調用?
的documentation說,只有約NSAssert enter code here
如果斷言()enter code 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?
我們不需要在Swift中使用NS_BLOCK_ASSRETIONS,因爲所有的斷言只有在Debug模式下才有效。 –