views:

50

answers:

2

I have built a small app that gets informations from a database on a website. the first thing the app does is to fetch an rss feed and then display it.

Apple guidelines tell to let the user decide if he/she wants to connect to the Internet, so I have placed an alert at the beginning showing "The app will connect to the Internet. Continue?" with two buttons: "Yes", and "No, quit"

if the user chooses "No, Quit", then I call:

[[UIApplication sharedApplication] terminateWithSuccess];

It Works. But I have read that Apple disencourage that, (Not an official API???) and that the only way to terminate an app should be the use of the Home button.

I tried an alernative: if the user press "No, Quit" I simply show a label that says "Quit the app using the Home Button"...

So, what should I do? leave the alert and quit the app or just show the "please quit" label???

+1  A: 

You may never actively terminate your app, otherwise Apple will reject the app (I know by experience ;-). Only thing you can do is show a dialog, e.g. a UIAlertView without any buttons, asking the user to quit via home button.

But I never heard about the guidelines you've cited regarding an Internet connection. Please give a link. I've worked on a lot of apps that connect to the Internet without asking and Apple never complained.

DarkDust
I think I have read somewhere that you should inform the user that the app is going to connect to the Internet...Will check. Or maybe it was just a "sugestion". In fact many apps simply connect and that's all.
Antonio
A: 

Just leave off the "No" button.

Either the user will hit "Yes" and connect, or the user will terminate (or background) your app by switching to another app, since they have no other choice.

App termination by simply forcing the user to do something reasonable.

hotpaw2