@@ -53,12 +53,16 @@ public class NSCUNUserNotificationCenterDelegate: NSObject, UNUserNotificationCe
5353 if ( remoteNotification [ " gcm.message_id " ] != nil ) {
5454 var message = parseNotification ( response. notification)
5555 message [ " foreground " ] = UIApplication . shared. applicationState == UIApplication . State. active
56- NSCFirebaseMessagingCore . onNotificationTapCallback ? ( message)
56+ NSCFirebaseMessagingCore . onNotificationTapCallback ? ( message) {
57+ completionHandler ( )
58+ }
5759 } else {
5860 if ( ( response. notification. request. trigger as? UNPushNotificationTrigger ) != nil ) {
5961 var message = remoteNotification
6062 message [ " foreground " ] = UIApplication . shared. applicationState == UIApplication . State. active
61- NSCFirebaseMessagingCore . onNotificationTapCallback ? ( message)
63+ NSCFirebaseMessagingCore . onNotificationTapCallback ? ( message) {
64+ completionHandler ( )
65+ }
6266 }
6367 }
6468
@@ -82,18 +86,22 @@ public class NSCUNUserNotificationCenterDelegate: NSObject, UNUserNotificationCe
8286 if ( notification. request. content. userInfo [ " gcm.message_id " ] != nil ) {
8387 var message = parseNotification ( notification)
8488 if ( message [ " contentAvailable " ] == nil ) {
85- NSCFirebaseMessagingCore . onMessageCallback ? ( message)
89+ NSCFirebaseMessagingCore . onMessageCallback ? ( message) {
90+ completionHandler ( options)
91+ }
8692 message [ " foreground " ] = UIApplication . shared. applicationState == UIApplication . State. active
93+ } else {
94+ completionHandler ( options)
8795 }
88- completionHandler ( options)
8996 return
9097 } else {
9198 if ( ( notification. request. trigger as? UNPushNotificationTrigger ) != nil ) {
9299
93100 var message = notification. request. content. userInfo
94101 message [ " foreground " ] = UIApplication . shared. applicationState == UIApplication . State. active
95- NSCFirebaseMessagingCore . onMessageCallback ? ( message)
96- completionHandler ( options)
102+ NSCFirebaseMessagingCore . onMessageCallback ? ( message) {
103+ completionHandler ( options)
104+ }
97105 return
98106 }
99107 }
0 commit comments