iosobjective-cswiftpush-notificationremote-notifications

How to enable/disable push notification from my app


I'm working on App that have push notification property. And I should enable/disable the push notification permission within my app without go to iPhone settings.

Is there a way to implement that?

I searched a lot, but I didn't find any proper way to implement it.

Any help?


Solution

  • If a user denied permissions for push notifications you can not let him enable it from within the app.

    You could however, set a button in your settings app (ViewController), and let the user switch the notifications off and on there. Then you can set a boolean to check before sending notifications. This way a user might use it instead of disabling the app's notification permission on the device settings.