Reputation: 682
Sometimes I set NSZombieEnabled environment argument to YES for debugging.
This time I forgot to turn off the option, and submitted my application to App Store.
I suppose this option is just an environment option, so and does not affect to submitted application.
Am I correct?
Upvotes: 0
Views: 1038
Reputation: 28473
To add some clarity to this answer:
I just ran a test. I inserted this code into my app at startup:
if(getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled"))
assert(NO);
I then configured XCode as per the image below.
I launched my app on the device in the debugger. As expected, it crashed with an assertion failure. I then disconnected the debugger and launched the application normally on the device. No crash.
Thus, provided you configure NSZombieEnabled in XCode in the manner below, it looks like you are OK submitting to app store.
Upvotes: 0
Reputation: 162722
Depends on how you set it. It is possible to toggle at runtime.
If you have just set it in the environment in Xcode, then -- no -- it won't be set when run on a device outside of Xcode.
(Note that zombie detection enabled uses a ton of memory because it effectively causes no object to be deallocated, just marked as "should have been deallocated")
Upvotes: 6