According to the documentation (https://developer.apple.com/documentation/usernotificationsui/unnotificationcontentextension), a Notification Content Extension should consist of a UIViewController that adopts the UNNotificationContentExtension protocol.
The only problem is that UNNotificationContentExtension's methods are not @MainActor isolated, but UIViewController is, which produces this error when you try to build your code with Complete concurrency checking turned on:
Main actor-isolated instance method 'didReceive' cannot be used to satisfy nonisolated protocol requirement
If you add nonisolated, you are then left with another problem in that UNNotification is not Sendable.
What is the recommended solution to this problem?