Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
890
165
Hi, I need to test the push notifications handling logic in my app. It presented the alert asking the user to enable or disable push notification. But it is not coming up anymore even if I remove the app and re-install it. Any ideas on how to get it back?
 
Hi, I need to test the push notifications handling logic in my app.

This isn't really an iOS Programming question, but just a general iOS question, to me. Let me know if you'd like me to move your thread to the appropriate forum.

It presented the alert asking the user to enable or disable push notification.

Did you pick the disable option?

But it is not coming up anymore even if I remove the app and re-install it. Any ideas on how to get it back?

Go to the Settings app > Notification Center. Does your app appear in the Include or Do Not Include section? If so, which one?
 
I believe if you uninstall the app and leave it uninstalled for at least 24 hours then reinstall it you will be prompted about push notifications again.
 
I think OP is asking as a developer, is it possible to manually prompt the user again, even if they declined push notifications the first time.

I don't believe this is possible because the only time it is presented is when you first call

Code:
- (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types

Any subsequent call just checks that the device is still registered
 
This worked for me!

Re: is it possible to get the push notification prompt back after you have pressed "don't allow"

I found a post on the web that told me to go to settings > notification center > go to the app that you need push notifications for, open it and make sure that all badge app icon, sounds and alerts are on for the app, then go back to settings and turn "airplane mode" off for 30 seconds then back on....I then had push notifications active again for that app. Happy Happy Happy!

Hope this helps! It worked for me! :)
 
Curious... It should reprompt after a uninstall / install. But no - it is not possible to reprompt a user in an iOS app for permissions. This applies to location, access to photos, push notifications, etc.

This is the same for push notifications on Safari for desktop browsers. (Side note I know, but it seems related.)

I cam across this post on TechCrunch not that long ago that really puts this into perspective, as far as pain-point for asking user permissions. Again, not totally related but seemed very on point.

http://techcrunch.com/2014/04/04/the-right-way-to-ask-users-for-ios-permissions/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.