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

Always forward received UNNotifications #1604

Merged

Conversation

smarty-concrete
Copy link
Contributor

@smarty-concrete smarty-concrete commented Jun 7, 2024

to an overridden user delegate, even before the messaging SDK is initialized.

Description

Provide details of the change, and generalize the change in the PR title above.

messaging.mm sets up a UNUserNotificationCenterDelegate in RequestPermission. If any other delegate was already set, it is designed to forward incoming notifications to the previous delegate in -[UIApplication userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]. However, RequestPermission may be called before Messaging is initialized, in which case these notifications were not being forwarded. If any user notifications come in before Firebase Messaging is initialized, the notification is lost.

This is the cause of firebase/firebase-unity-sdk#377 as well as Unity-Technologies/com.unity.mobile.notifications#316

Notifications should now be forwarded to the overridden delegate, whether Messaging is initialized or not.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

…n user delegate, even before the messaging SDK is initialized.
Copy link

github-actions bot commented Jun 11, 2024

✅  Integration test succeeded!

Requested by @jonsimantov on commit refs/pull/1604/merge
Last updated: Tue Jun 11 15:55 PDT 2024
View integration test log & download artifacts

@github-actions github-actions bot added the tests: succeeded This PR's integration tests succeeded. label Jun 11, 2024
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 11, 2024
@jonsimantov jonsimantov self-requested a review June 25, 2024 17:28
@jonsimantov jonsimantov merged commit 13a3195 into firebase:main Jun 25, 2024
26 checks passed
@firebase firebase locked and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests: succeeded This PR's integration tests succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants