I am developing an app with push notifications. To check all possible ways of user interaction, I'd like to test my app when a user declines to have push notifications enabled for my app during the first start.
The dialog (initiated by registerForRemoteNotificationTypes
), however, appears only once per app. How do I reset the iPhone OS's memory of my app. Deleting the app and reinstalling doesn't help.
Best Answer
Technical Note TN2265: Troubleshooting Push Notifications
Update: As noted in the comments below, this solution stopped working since iOS 5.1. I would encourage filing a bug with Apple so they can update their documentation. The current solution seems to be resetting the device's content and settings.
Update: The tech note has been updated with new steps that work correctly as of iOS 7.
UPDATE as of iOS 9
Simply deleting and reinstalling the app will reset the notification status to
notDetermined
(meaning prompts will appear).Thanks to the answer by Gomfucius below: https://stackoverflow.com/a/33247900/704803