sean.p.kane
sean.p.kane

Reputation: 33

Programmatically exiting iPhone app following rejected disclaimer

I'm currently working on an iPhone app that requires the user to accept a terms of use/disclaimer. If the user does not accept the disclaimer, I would like the app to close.

It is my understanding that exit(0); is frowned upon (as discussed at Proper way to exit iPhone application?) and the Human Interface Guidelines state that the only time an application should close is via user intervention.

  1. What is the best practice for stopping the functionality of my app if the user presses a 'Reject' button for the disclaimer?
  2. Should exit(0); be called, or is there a more graceful way to close the app? I'm not necessarily worried about removing the app from memory -- I'm just wanting the app to kick the user back to the home screen.
  3. Does the user pressing a 'Reject' button constitute user intervention, consistent with the Human Interface Guidelines?

Upvotes: 3

Views: 1732

Answers (4)

OMA
OMA

Reputation: 3691

In my case I had a message at the beginning of my app stating that some amount of data should be downloaded before continuing, with two buttons to "Continue" or "Exit" the app. The "Exit" button didn't really exit but just bring to front the Safari browser to show our home page.

And this app got rejected by the App Store reviewers just because of that Exit button. The funny thing is they rejected the app when submitting my second update to the original version! (the two previous versions had been approved just fine and had that very same "Exit" button).

Anyway, it seems it's important not to exit your app in any way.

Upvotes: 2

Jeremy W. Sherman
Jeremy W. Sherman

Reputation: 36143

The correct way to handle this would be to write your terms into the EULA that goes along with your application. The gatekeeper then becomes the App Store, and this problem goes away. You can then assume that anyone running your app has agreed to the terms.

Apple provides a standard EULA, but your laywers can supply you with a custom one. Apple just has a few requirements that that custom EULA's terms must meet.

Upvotes: 4

lxt
lxt

Reputation: 31304

Your app will almost certainly be rejected if you force it to quit programatically. You should simply present a pop-up informing the user they cannot use the app unless they accept the disclaimer, and ask them to press the Home button to exit. Basically, don't kick the user out of the app at any point. Let them decide when to leave.

Upvotes: 1

taskinoor
taskinoor

Reputation: 46027

In my opinion, the best thing to do after user taps "reject" is to give him a sorry message without any button to proceed. In other words, the user will have nothing to do without pressing the home button. It's better than exit(0) as that looks like a crash.

Upvotes: 3

Related Questions