How do I get a push image when the app is in the background? apply the swift source file to the fuse app.
.unoproj file
->
“SystemCapabilities”: {
“Push”: true
}
.uxl file
->
〈key〉NSExtension〈/key〉
〈dict〉
〈key>NSExtensionAttributes〈/key〉
〈key>NSExtensionPointIdentifier</key〉
〈string>com.apple.usernotifications.service</string〉
〈key>NSExtensionPrincipalClass</key〉
〈string>NotificationService</string〉
〈/dict〉
〈key〉NSAppTransportSecurity</key〉
〈dict〉
〈key〉NSAllowsArbitraryLoads</key〉
〈true/〉
〈/dict〉
NotificationService.swift
->
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
print("--------------------------------------------------This is a log message.")
self.contentHandler = contentHandler
…
}
override func serviceExtensionTimeWillExpire() {
}
Is there something wrong with me?
Or did I miss anything?