I need to be able to terminate my iOS app when it starts up if the device isn't email capable. What is the code to exit from the app altogether?
There is literally no way to terminate an iOS app. (Well, you can call 'abort()' I guess, but this will crash the app and send off a crash report, which is not what you want.) Also, at a more general level, there isn't really a distinction between "running" and "not running" in an iOS app. It's more of a question of which resources (threads, memory, etc) the app is currently using.
If your app starts and cannot proceed for some reason, then the cleanest thing to do is to segue to a view that contains text explaining what went wrong. You can then just leave this view displayed. It's then up to the user to switch to a different app.
Alternatively, if you have (say) a link to a web page that has suggestions about how to handle the situation, you could have a button or a link in your view that the user can tap.
Personally, I wouldn't use an alert for this, because the user is going to think that dismissing the alert means something will happen next, but it doesn't and can't. A static view explaining the problem seems like a better idea.