You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sent a Silent Notification using firebase messaging api.
Swizzling is on
But the method application:didReceiveRemoteNotification:userInfo: not being triggered
Reproducing the issue
I sent a silent notification through https://fcm.googleapis.com/v1/projects/jedai-sdk/messages:send
with the next body { "message": { "token": "FCM_TOKEN", "apns": { "headers": { "apns-priority": "5" // Use "5" for silent, background notifications }, "payload": { "aps": { "content-available": 1 } } }, "data": { "key1": "2", "key2": "value2" } } }
In my AppDelegate.swift I have the next implementation func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { print("BennyDebug in didReceiveRemoteNotification \(userInfo)") completionHandler(.newData) }
When swizzling if off, the method being invoked.
However when swizzling if on, this method not being called.
Firebase SDK Version
11.4.0
Xcode Version
16.1
Installation Method
Swift Package Manager
Firebase Product(s)
Messaging
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
Hi @bennyd-intenthq, I was able to reproduce the issue. The didReceiveRemoteNotification will only be called when I removed the UNUserNotificationCenter.current().delegate = self. I'll consult this to our engineers to see if it's a bug or intended.
Description
I sent a Silent Notification using firebase messaging api.
Swizzling is on
But the method
application:didReceiveRemoteNotification:userInfo:
not being triggeredReproducing the issue
I sent a silent notification through
https://fcm.googleapis.com/v1/projects/jedai-sdk/messages:send
with the next body
{ "message": { "token": "FCM_TOKEN", "apns": { "headers": { "apns-priority": "5" // Use "5" for silent, background notifications }, "payload": { "aps": { "content-available": 1 } } }, "data": { "key1": "2", "key2": "value2" } } }
In my AppDelegate.swift I have the next implementation
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { print("BennyDebug in didReceiveRemoteNotification \(userInfo)") completionHandler(.newData) }
When swizzling if off, the method being invoked.
However when swizzling if on, this method not being called.
Firebase SDK Version
11.4.0
Xcode Version
16.1
Installation Method
Swift Package Manager
Firebase Product(s)
Messaging
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetIf using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: