Pushwoosh and Firebase handle notifications differently when an app is open. If foreground alerts work for Firebase but not Pushwoosh, the cause is usually how your code manages the notification delegate.
On iOS, Pushwoosh does not use method swizzling for the notification delegate — it uses a proxy pattern instead. If Firebase (or your own code) assigns itself as the sole UNUserNotificationCenter delegate, it can intercept the callbacks before Pushwoosh's proxy runs, so Pushwoosh never sees the incoming data or triggers its own display logic.
To fix this, register your delegate with Pushwoosh's proxy instead of setting it directly on UNUserNotificationCenter:
Pushwoosh.sharedInstance().notificationCenterDelegateProxy?.add(myDelegate)Inside your delegate's callbacks, skip messages Pushwoosh already owns and only handle your own (e.g. Firebase's):
if !PWMessage.isPushwooshMessage(notification.request.content.userInfo) {
// handle your own notification here
}If Firebase's own automatic delegate swizzling (FirebaseAppDelegateProxyEnabled) is enabled, make sure it is not also grabbing the delegate before Pushwoosh's proxy is registered.
Comments
0 comments
Please sign in to leave a comment.