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

[Improvement] Add this line to code for fix actionable notifications #542

Closed
roman-rr opened this issue Oct 12, 2020 · 1 comment
Closed

Comments

@roman-rr
Copy link

Hey @dpa99c
I don't wanna create new pull request (it will override some my custom local changes).
But please, just add this line into AppDelegate+FirebasePlugin.m line number 76

// Delegate notification center here (prevent missing notifications)
[UNUserNotificationCenter currentNotificationCenter].delegate = self;

It is required by apple docs

Important
You must assign your delegate object to the UNUserNotificationCenter object before your app finishes launching. For example, in an iOS app, you must assign it in the application:willFinishLaunchingWithOptions: or application:didFinishLaunchingWithOptions: method of your app delegate. Assigning a delegate after these methods are called might cause you to miss incoming notifications.

In my case it solve problem when app was terminated by user, and then first actionable notification doesn't trigger function in background. Only first, because it is call application:didFinishLaunchingWithOptions:, and notifications there was not ready.

@spennyf
Copy link

spennyf commented Feb 2, 2021

Hey, thanks for the great work on this plugin, any chance this will be merged in soon?

@dpa99c dpa99c closed this as completed in 1caf788 Mar 23, 2021
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

No branches or pull requests

2 participants