简体   繁体   中英

iOS - Unable to remove push notification permission when setting overwrites old version with new version which removed push notifications

I built an app with push notifications added (version 1.0), I have them installed and allow to receive notifications when the permission popup appears and that permission appears in the app's settings.

img: allow-push-notification

I received a request to remove push notifications from the current app. I have removed the push notification capability (.entitlements file) and removed the source implementation of registration, show notification but when I use xcode to overwrite app ver 1.0, the permission to receive notifications still exists in settings. Only when I remove the old app and install the new one does it disappear.

Is there any solution that can help me to remove the notification permission without having to delete the app and reinstall it?

Thanks for the solutions from everyone!

There are two different things here;

One is an entitlement to register for push notifications.

The second is permission from the user to show notifications (whether local or remote).

Your app can include the push notification entitlement but not ask the user for notification permissions. This allows your app to receive "silent" notifications, to trigger a data refresh, for example.

Once your app has asked the user for permission to display notifications (whether you intend to show local or remote) the notification settings will show in the app settings. This cannot be removed, except by the user removing your app and reinstalling it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM