react-native-push-notification / ios

React Native Push Notification API for iOS.
MIT License
748 stars 285 forks source link

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

Closed bang9 closed 3 years ago

bang9 commented 3 years ago

may resolve #163

related issues https://github.com/invertase/react-native-firebase/issues/3944 https://github.com/firebase/firebase-ios-sdk/pull/6863

bang9 commented 3 years ago

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 commented 3 years ago

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