Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top