The object for managing notification-related settings and the authorization status of your app.
- iOS 10.0+
- macOS 10.14+
- Mac Catalyst 13.0+Beta
- tvOS 10.0+
- watchOS 3.0+
UNNotification object contains the current authorization status and notification-related settings for your app. Apps must receive authorization to schedule notifications and to interact with the user. Apps that run in CarPlay must similarly receive authorization to do so. You use this object to determine what notification-related actions your app is allowed to perform. You might then use that information to enable, disable, or adjust your app's notification-related behaviors. Regardless of whether you take action, the system enforces your app's settings by preventing denied interactions from occurring.
You don't create instances of this class directly. Instead, call the
get method of your app’s
UNUser object to get the current settings.
For more information about requesting authorization for user interactions, see