Skip to content

fix: avoid crash on iOS 14 when push comes on foreground #234

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

Merged
merged 1 commit into from
Nov 22, 2020

Conversation

bang9
Copy link

@bang9 bang9 commented Nov 13, 2020

@bang9 bang9 marked this pull request as draft November 13, 2020 20:52
@bang9 bang9 marked this pull request as ready for review November 13, 2020 21:03
@bang9
Copy link
Author

bang9 commented Nov 13, 2020

If you use react-native-push-notification with react-native-firebase
do not call finish, remote notification will be handled by native firebase sdk with proxy method

PushNotification.configure({
      onNotification: (notification) => {
          // do not call finish
          // notification.finish(PushNotificationIOS.FetchResult.NoData);
      }
})

@polaris018
Copy link

It will make to avoid the crash, but Push notifications doesn't work in foreground.

@Naturalclar Naturalclar changed the base branch from master to next November 22, 2020 07:47
Copy link
Collaborator

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm not able to reproduce the crash for my use, so I'll publish new package with this fix as beta

@Naturalclar Naturalclar merged commit b75c6ed into react-native-push-notification:next Nov 22, 2020
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.

iOS App running on iOS 14 crashes every-time new push comes #1569
3 participants