NS_BLOCK_ASSERTIONS does not block an assertion failure coming from a static library. How do we suppress assertion failure coming from a static library?
Asked
Active
Viewed 359 times
4
-
How to block the assertion failure in a static library? NS_BLOCK_ASSERTIONS doesn't suppress that. – Boon May 08 '13 at 22:34
1 Answers
3
NS_BLOCK_ASSERTIONS
must be defined at compile time. If the library has been compiled with assertion code that you want to suppress (which sounds extremely dangerous), you will need to create a subclass of NSAssertionHandler
that ignores those particular failures and install it in the thread dictionary.

一二三
- 21,059
- 11
- 65
- 74