After some tests, I can say the following:
[UIApplication sharedApplication]
will cause the app looking like it crashed, BUT it will call - (void)applicationWillTerminate:(UIApplication *)application
before doing so;exit(0);
will also terminate the application, but it will look "normal" (the springboard's icons appears like expected, with the zoom out effect), BUT it won't call the - (void)applicationWillTerminate:(UIApplication *)application
delegate method.My advice:
- (void)applicationWillTerminate:(UIApplication *)application
on the delegate.exit(0);
.