tags:

views:

54

answers:

2

When the user selects "Reject" on my Terms and Conditions page, I'm able to display an alert, but I can't figure out how to exit from the application completely. Is there a way to do that?

+1  A: 

Yes, but it's evil.

Simply call exit(0).

Jacob Relkin
Correct answer, but it'll almost surely get you rejected.
kubi
and if you `#define exit(a) *(char*)a=0xdeadbeef;`?
mvds
You'll still be rejected for your app crashing. It's not a call thing so much as a usability thing. Apple doesn't care if the app crashed on purpose - it should not crash at all in testing.
Kendall Helmstetter Gelner
damn, forgot the `<irony>` tag **again**!
mvds
+3  A: 

Apple discourages apps from quitting themselves—it gives the user the impression that the app has crashed—and based on the fact that I've never seen an app display terms-and-conditions nonsense when it starts up, I'd guess that that's a surefire way to get your app rejected from the Store in any case. iTunes Connect allows you to provide custom license text when you're submitting the app; I'd recommend just using that.

Noah Witherspoon
Just show only an "Accept" button. Reject is that round button below the screen. This will be accepted by Apple.
mvds
Exactly, if a user does not choose to accept they can just quit the app.
Kendall Helmstetter Gelner