Requests the notification settings for this app.
- iOS 10.0+
- macOS 10.14+
- Mac Catalyst 13.0+Beta
- tvOS 10.0+
- watchOS 3.0+
The block to execute asynchronously with the results. This block may be executed on a background thread. The block has no return value and takes the following parameter:
UNNotificationobject containing the current authorization settings for your app.
Use this method to determine the user interactions and notification-related features that your app is authorized to use. You might then use this information to enable or disable specific notification-related features of your app.
When the user initially grants authorization to your app, the system gives your app a set of default notification-related settings. The user may change those settings at any time to enable or disable specific capabilities. For example, the user might disable the playing of sounds when a notification arrives.