iosswiftsettingsapplication-settingsunnotificationrequest

Get User's Notification settings


Overview

Aim

I tried to Google my problem and came across this but the links provided in the solution have been removed.

enter image description here


Solution

  • If you are specifically trying to read notification settings and options, you can do it with this. Then you can take them directly to the settings app yourself if they want to change it.

        UNUserNotificationCenter.current().getNotificationSettings(){ (settings) in
    
            switch settings.soundSetting{
            case .enabled:
                print("setting enabled")
            case .disabled:
                print("setting has been disabled")
            case .notSupported:
                print("somethings wrong here")
            }
        }