The object that processes incoming notifications and notification-related actions.
- iOS 10.0+
- macOS 10.14+
- UIKit for Mac 13.0+Beta
- tvOS 10.0+
- watchOS 3.0+
Use the delegate object to respond to user-selected actions and to process incoming notifications when your app is in the foreground. For example, you might use your delegate to silence notifications when your app is in the foreground.
To guarantee that your app responds to all actionable notifications, you must set the value of this property before your app finishes launching. For an iOS app, this means updating this property in the
application(_: method of the app delegate. Notifications that cause your app to be launched or delivered shortly after these methods finish executing.
For more information about implementing the delegate methods, see