views:

84

answers:

1

Hi Guys,

Is there any way I could make the "Would you like to enable push notifications..." dialogue not to come up upon first time application launch but rather on some other action in the application?

Regardz, Mladen

+2  A: 

The dialog should not appear until you call the method registerForRemoteNotificationTypes. I assume you're calling it in appDidFinishLoading at the moment? Just move it to the part of your application that is relevant to Push Notifications.

It's a similar situation with CoreLocation. It can confuse the user if you request the users location before your application has indicated why it needs it.

lyonanderson
That does it. Thx. Is it necessary to call method at appFinishLoading, or I can leave it where is it now(some onclick action in some view controller)?
Mladen
You can do it wherever you think it's appropriate. If you do it in appDidFinishLoading you'll prompt to the user when the app starts.
lyonanderson