3

In Xcode, why is Enable Foundation Assertions set to YES by default for all builds, including Release? Is Apple advocating/recommend that we ship with asserts?

Boon
  • 40,656
  • 60
  • 209
  • 315
  • This flag is in the preprocessing settings, no? Would it not matter then? – Mike D Mar 11 '14 at 19:45
  • 3
    It matters - that means your assertion will go out in your release build by default if you don't pay attention. – Boon Mar 11 '14 at 19:46
  • what do you wanna hear? that it is a bade idea? Or not? (I mean ... I would say: leave valid assertions in) – Daij-Djan Mar 11 '14 at 19:51
  • write a custom assertionHandler if you want... like xcode does – Daij-Djan Mar 11 '14 at 19:51
  • @Boon Apparently, but in projects updated from Xcode 4.x, the original [Compiler flags are kept](http://stackoverflow.com/q/20377845/620197). Easy to overlook for new projects. – Mike D Mar 11 '14 at 20:02
  • @Daji-Djan Read the second part of my question. – Boon Mar 11 '14 at 20:03

1 Answers1

0

@Mike answered in the comments: "Apparently, but in projects updated from Xcode 4.x, the original Compiler flags are kept. Easy to overlook for new projects."

bshirley
  • 8,217
  • 1
  • 37
  • 43