capacitor/ios upgrade 5.0.5 => 5.7.2; onesignal-cordova-plugin upgrade 5.0.0-beta-02 => 5.1.0

This commit is contained in:
2024-03-17 10:53:33 +08:00
parent 8143c0b899
commit b289c032cc
40 changed files with 4250 additions and 17599 deletions
@@ -9,9 +9,6 @@ class NotificationService: UNNotificationServiceExtension {
var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
print("Running NotificationServiceExtension")
self.receivedRequest = request
self.contentHandler = contentHandler
self.bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
@@ -20,8 +17,8 @@ class NotificationService: UNNotificationServiceExtension {
/* DEBUGGING: Uncomment the 2 lines below to check this extension is executing
Note, this extension only runs when mutable-content is set
Setting an attachment or action buttons automatically adds this */
print("Running NotificationServiceExtension")
bestAttemptContent.body = "[Modified] " + bestAttemptContent.body
// print("Running NotificationServiceExtension")
// bestAttemptContent.body = "[Modified] " + bestAttemptContent.body
OneSignalExtension.didReceiveNotificationExtensionRequest(self.receivedRequest, with: bestAttemptContent, withContentHandler: self.contentHandler)
}