nburk
nburk

Reputation: 22731

Regenerate iOS system alert for push notification permission AFTER app has been deleted and reinstalled

I am wondering about the system alert that is displayed before the device token is requested from an APNS server, to ask the user for permission that this app should receive push notifications.

I know it's not possible to regenerate this alert once it appeared for the first time and that it's vert obtrusive for a user to re-enable push if he denied the permissions in the first place. In fact, most users will probably never enable push if they initially denied it.

I am wondering however about the situation when the app has been completely deleted and reinstalled on the device. In my opinion, this should regenerate the same alert again since a delete procedure is associated with losing any information concerning that particular app, so the information about the push request should also be deleted and requested once again after the app was reinstalled. However, this doesn't actually seem to happen. I am testing quite extensively, deleting and reinstalling my app several times, but the system alert never shows up any more.

Does anybody know whether there is actually a way to regenerate this system alert? And why Apple maybe decided to not show it again even after the app was deleted? Was this really intensional, this doesn't seem well thought-through to me...

Upvotes: 1

Views: 506

Answers (1)

rishu1992
rishu1992

Reputation: 1434

Resetting the Push Notifications Permissions Alert on iOS The first time a push-enabled app registers for push notifications, iOS asks the user if they wish to receive notifications for that app. Once the user has responded to this alert it is not presented again unless the device is restored or the app has been uninstalled for at least a day.

If you want to simulate a first-time run of your app, you can leave the app uninstalled for a day. You can achieve the latter without actually waiting a day by following these steps:

Delete your app from the device.

Turn the device off completely and turn it back on.

Go to Settings > General > Date & Time and set the date ahead a day or more.

Turn the device off completely again and turn it back on

Referred:https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG42

Upvotes: 2

Related Questions