I know this has been asked: How to show "Would like to send you Push Notifications" Alert View again? ... But My question is kind of different. My question is that is it possible to prompt this when ever I want programmatically (not for debugging but for real). Probably not because this is an alert triggered by the operating system, but is there a way to "undo" if a user clicked "don't allow". My app has a tutorial I want to pop this message when the user finishes the tutorial. Should I just register for push notifications after the tutorial?. Or what the user has to "allow" on the settings menu so I can add it to the tutorial. Thanks
Asked
Active
Viewed 127 times
1 Answers
1
To trigger popup you provide on image you should call
[[UIApplicaton sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeNewsstandContentAvailability]
This is possible to do in any place in app.
To check available permissions use:
UIRemoteNotificationType* enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

Eric Brown
- 13,774
- 7
- 30
- 71

sage444
- 5,661
- 4
- 33
- 60
-
Can you edit this to be clearer? It doesn't make much sense to me as it stands. – Eric Brown Mar 06 '14 at 17:43
-
how can i check the enabledTypes? it's a strange enum... how can I print them in a NSLog or something... in my case (enabledTypes == 7) is true – user2387149 Mar 06 '14 at 18:42
-
yep, bit fields a bit strange for first look, but read some manual about bits and bit shifts and all become clean – sage444 Mar 06 '14 at 19:32
-
so basically you can trigger this alert when ever you want... but just once... that sucks... – user2387149 Mar 07 '14 at 04:41