Should one leave asserts in production iOS apps?

后端 未结 4 445
梦如初夏
梦如初夏 2021-02-08 20:12

Common practice might be to put asserts in code to check input parameters, data integrity, and such, during app development.

I test my apps, BUT, given that I\'m not K

4条回答
  •  [愿得一人]
    2021-02-08 21:02

    My NSAssert failures indicate something went horribly wrong and proceeding further would result in undefined behaviour and data corruption. I can't imagine why people parrot disabling them in release builds.

    If you can recover from it, you should be using an NSError instead.

提交回复
热议问题