When debugging a Debug assembly, I prefer something that crashes into a debugger, so I will not only know the reason, but also, if necessary, pull it out for more details. Sending a random message to any object other than nil is one of Objective-C's ways to do this.
[ UIApplication foo: bar ]
For submission to the App Store -terminate, your application will definitely be rejected for using the (officially) undocumented API. And, reportedly, output (0) also does this, even if it is a documented OS call.
Prior to OS 4.0, you can always submit a Safari URL, which will cause your application to gracefully shut down. Not sure what to do in OS 4.0 and after that in the app store is legal.
source share