The UNNotificationContentExtension protocol provides the entry point for a notification content app extension, which displays a custom interface for your app’s notifications.
UNnotificationscontentextension is one of the extensions that can be added to a regular iOS app. It would be like a small separate app that can process UNNotifications arriving to the app.
One reason for adding this extension is that even when the associated iOS app is not running, the extension can receive the UNNotification and process it, including changing/setting the badge number.
It can share data with the associated iOS app through a shared UserDefaults.