Start a Project

Enable/Disable Push Notification From The App

Hello guys, Today we learn about Enable/Disable Push Notification From The App functionality.

To get more knowledge about push notification functionality Please click Here.

In most of the apps, we give the push notification to enable/ disable the push notification feature from the device setting. but sometimes we want to give that feature inside our app setting. For this what do we do? so let’s start.

Getting Started:-

Step1:- Firstly Create an XCode project

File–> New–> Project–> iOS –> Next And Add your project name then create

Step2:- Secondly, Implement the push notification functionality for this, please click here.

step3:- After implementing the push notification, we give some notification enable disable button from where user easily turns on and off the notification working, when user clicks on the button it redirects to the iPhone device setting, to remove this functionality we need to add some cases in our code.

Here we need to call the app delegate class to operate push notification working when the user enables to disable the notification function inside the app

Now, we need to create a function in the AppDelegate class

Also, we need to call the same function in the didFinishLaunchingWithOptions method.

Conclusion:-

In, this blog we discussed the working of Enable/Disable Push Notification From The App.

I hope, this blog will help you to understand the flow of enabling/disabling functionality

Thanks for reading!!

Exit mobile version