I want to have a UISwitch in my app that when pressed will either request notification authorization or if already authorized reject it.
Is there a way to perform a rejection? I know that if requestAuthorization is called and the user has already authorized the app then nothing will happen. So I was curious if there is a way in app to remove the notification permissions without forcing the user to go to the settings app on their device and doing it from there.
Once a user has granted (or denied) location permissions by responding to the original permission request dialog, the only way that the permissions can be changed is by the user themselves using the device settings app.
Your app can simply not make use of a permission that it has. For example, if the user turns off the 'notifications' switch in your app, unscheduled any scheduled local notifications and don't schedule any more.