I have just discovered the nifty unhandled exception handler for cocoa-touch.
Now that I can gracefully notify the user about any unhandled exceptions that might crash my application, I’d like to shut down my application after notifying the user that a crash has occured.
Does anyone know how to shut down an application programmatically?
You can call [[UIApplication sharedApplication] terminate]; – that won’t build the screenshot Springboard uses to animate the application’s exit, though, so the screen will just go black until the icons move in. There doesn’t seem to be a published way to do this; the UIApplication header doesn’t even mention the -terminate method, so you may just not be meant to do it at all.