cordova-plugin-firebasex
cordova-plugin-firebasex copied to clipboard
Support other push notification providers on iOS
Feature request
Firebasex catches all notification responses sent by UNUserNotificationCenter, as long as the trigger is of type UNPushNotificationTrigger.
In AppDelegate+FirebasePlugin.m
// Asks the delegate to process the user's response to a delivered notification.
// Called when user taps on system notification
- (void) userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void (^)(void))completionHandler
{
@try{
if (![response.notification.request.trigger isKindOfClass:UNPushNotificationTrigger.class] && ![response.notification.request.trigger isKindOfClass:UNTimeIntervalNotificationTrigger.class]){
// FIXME: with push notifications, we never reach this line.
if (_previousDelegate) {
// bubbling event
[_previousDelegate userNotificationCenter:center
didReceiveNotificationResponse:response
withCompletionHandler:completionHandler];
return;
This prevents other push providers from listening to clicks on their push notifications. I see a couple ways to fix this:
- why not systematically forward clicks, whatever the trigger?
- let developers override this behavior with a cordova setting.
@dpa99c Hey, any feedback on this?
@stephanejais You are welcome to submit a PR implementing this