Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Implement non-blocking mechanism for consuming iOS app delegate events #443

Open
ajberasategui opened this issue Jul 2, 2020 · 6 comments
Labels
feature request New feature request ios relates to iOS platform

Comments

@ajberasategui
Copy link

Feature request

I'm trying to integrate my application with Airship by using https://github.com/urbanairship/urbanairship-cordova

It happens that AppDelegate+FirebasePlugin.m is registering itself as Notifications delegate which produces this plugin to get the notifications instead of the Airship one.

I've been looking around for a way to disable it and couldn't find any in the current implementation. So, this is both a feature request but also, if currently there's a way that I did not see to do the disabling, I'm asking for help to figure it out.

Also, a very big thank you to @dpa99c for the awesome work on this plugin.

@dpa99c
Copy link
Owner

dpa99c commented Jul 2, 2020

Since only one instance of a delegate method can be registered, this is not an issue specific to this plugin but more generally to how Cordova handles app delegates on iOS.

There is no easy way of "disabling" the app delegate class that this plugin registers - without it, the plugin will not work properly.

The ideal solution would be an intermediate app delegate class which rebroadcast app delegate events, allowing multiple plugins to register for and receive the same app delegate events.

Cordova does not currently have a built-in mechanism for this, however there now exists cordova-plugin-app-event which provides a 3rd party solution for this.

If this plugin were adapted to use that plugin's broadcast mechanism instead of directly registering its own app delegate methods, that would theoretically enable other plugins to receive the same app delegate events, but only if they also conform to the same approach and use cordova-plugin-app-event to receive their app delegate events.

So it's something that could definitely be added to this plugin but would require other plugins (e.g. in this case Urban Airship) to be updated likewise to use the same mechanism.

@dpa99c dpa99c changed the title Disable Notification Delegate [FEATURE] Disable Notification Delegate Jul 2, 2020
@dpa99c dpa99c added feature request New feature request ios relates to iOS platform labels Jul 2, 2020
@ajberasategui
Copy link
Author

Thank you very much @dpa99c!

@dpa99c dpa99c changed the title [FEATURE] Disable Notification Delegate [FEATURE] Implement non-blocking mechanism for consuming iOS app delegate events Jul 2, 2020
@stale
Copy link

stale bot commented May 12, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 12, 2021
@stale stale bot closed this as completed May 19, 2021
@dpa99c
Copy link
Owner

dpa99c commented Jul 23, 2021

Reopening as stalebot incorrectly closed it

@dpa99c dpa99c reopened this Jul 23, 2021
@dpa99c dpa99c removed the wontfix label Jul 23, 2021
@Phoenix-Alpha
Copy link

Phoenix-Alpha commented Jul 31, 2021

Hi @dpa99c,
Thanks for opening this issue again. I recently found reason why iOS foreground notification not working on my app which I used both firebasex & local notification. It will be perfect if you can integrate local notification feature to this plugin to make both features work in harmony. I was a bit frustrated to see that local notification not compatible with this plugin. Could you add this feature to this plugin or recommend another plugin for local notification in the documentation? Thanks.

@Maho38
Copy link

Maho38 commented Jan 16, 2024

Hello @dpa99c,
for me it would also be great if you could integrate local notifications into this plugin. That's why I'm also asking if you could add this feature to this plugin or recommend another plugin for local notifications in the documentation?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request ios relates to iOS platform
Projects
None yet
Development

No branches or pull requests

4 participants