0

How to enable Assertions in objective?

I have added a third party library which has some Assertions. But it does not work. I think Assertions are disabled. So I want enable it.

Lorenzo B
  • 33,456
  • 23
  • 115
  • 188
Shaheer Palolla
  • 265
  • 4
  • 11

1 Answers1

2

You need to use NSAssert for the assertions.

The NSAssertions are disabled if the NS_BLOCK_ASSERTIONS is specified.

You can use the NSAssert like:

NSAssert(count != 0, @"Count should be greater than zero"); 
Martin R
  • 510,973
  • 84
  • 1,183
  • 1,314
Midhun MP
  • 97,760
  • 30
  • 152
  • 197