I’m testing remote push notifications on macOS, and although notifications are received and displayed correctly, my Notification Service Extension (NSE) never gets invoked.
The extension is properly added as a target in the same app, uses the UNNotificationServiceExtension class, and implements both didReceive(_:withContentHandler:) and serviceExtensionTimeWillExpire(). I’ve also set "mutable-content": 1 in the APNS payload, similar to how it works on iOS — where the same code correctly triggers the NSE. On macOS, however, there’s no sign that the extension process starts or the delegate methods are called.
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
override func didReceive(_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
let modified = (request.content.mutableCopy() as? UNMutableNotificationContent)
modified?.title = "[Modified] " + (modified?.title ?? "")
contentHandler(modified ?? request.content)
}
override func serviceExtensionTimeWillExpire() {
// Called if the extension times out before finishing
}
}
And the payload used for testing:
{
"aps": {
"alert": {
"title": "Meeting Reminder",
"body": "Join the weekly sync call"
},
"mutable-content": 1
},
"MEETING_ORGANIZER": "Alex Johnson"
}
Despite all correct setup steps, the NSE never triggers on macOS (while working fine on iOS). Can anyone confirm whether UNNotificationServiceExtension is fully supported for remote notifications on macOS, or if additional configuration or entitlement is needed?