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

[IOS][NOTIFICATIONS] getInitialNotification resolves last received notification #1820

Conversation

johankasperi
Copy link

Summary

We are seeing an issue in our production app (using react-native-firebase#5.2.0) happening when the app has been in the background for a long time. Whats happening is that next time you bring the app to foreground (not by tapping on a received notification), getInitialNotification resolves the last received notification.

The bug is quite similar to the issue described in react-native-fcm

After using the fixes in this PR we are not seeing this bug anymore.

Checklist

  • Supports Android
  • Supports iOS
  • e2e tests added or updated in /tests/e2e/*
  • Updated the documentation in the docs repo
    • LINK TO DOCS PR HERE
  • Flow types updated
  • Typescript types updated

Test Plan

Release Plan

[IOS][BUGFIX][NOTIFICATIONS] - getInitialNotification resolves last received notification


Think react-native-firebase is great? Please consider supporting the project with any of the below:

…Set initial and launch notifications to nil in getInitialNotification
@CLAassistant
Copy link

CLAassistant commented Jan 10, 2019

CLA assistant check
All committers have signed the CLA.

@mikehardy
Copy link
Collaborator

Hi there! I'm helping maintain the v5 branch along with @Salakar and I believe we have CI all sorted and tests green etc so the v5 branch can tolerate change now. If you rebase to current v5.x.x and push this again, I can check into it and try to get it merged for you. @johankasperi what do you think?

@johankasperi
Copy link
Author

Hi Mike! Yeah I think it is better if we close this PR for now since I haven't tested the latest 5.x.x version and I cannot confirm if the bug still exists. If we see the bug again I will open a new PR

@mikehardy
Copy link
Collaborator

Okay - I'm closing this, but I'll admit I'll be surprised if this doesn't still happen, so if you see it feel free to reopen. Things haven't moved so far that it should be hard to shape it again and submit it, and I'll help shepherd it to a merge. Thanks!

@mikehardy
Copy link
Collaborator

@luatnd do you believe this is still valid? If you use patch-package to check it locally and it works for you we can reopen this and maybe merge it? (cross-linked from issue #2618)

@luatnd
Copy link

luatnd commented Nov 22, 2019

Yes, I patched and tested it, seem OK, but it's just my test, replied to you at #2168

@johankasperi
Copy link
Author

Hi guys! Sorry for not being so active in this issue anymore but I'm currently not using pushnotifications from rn-firebase in any of my projects. However, I'm happy to help with any obj-c code if needed. Read #2618 and this PR might be able to solve this. But as you said, it's only for iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants