Skip to content

Conversation

@wezzle
Copy link
Contributor

@wezzle wezzle commented Jan 22, 2018

This solution will solve two plugins from disabling the other as a notification delegate in iOS. The current delegate set on the notification center is saved in a property. When presenting or handing response the handler checks the notification type as already present in the current code. If the notification type is a remote notification it is proxied to the previously available delegate.

This solves a current problem with the cordova-plugin-firebase:

  1. Firebase registers as delegate
  2. Local notifications registers as delegate
  3. Remote push is received, is handled by local notifications and then returned without action.

And adds:
4. Local notifications calls Firebase's delegate and Firebase handles the remote notification as if it was the current delegate set on the notification center.

In my opinion this is something all plugins working with the notification center should do as there can only be one delegate set on the notification center, receiving all notifications remote or local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants