react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

onNotificationOpened isn't called when opening remote notification on iOS

Open siderakis opened this issue 8 years ago • 4 comments

Issue

The callback is never called when opening remote notifications. Local notifications do fire the callback when opened.

firebase
        .notifications()
        .onNotificationOpened((notificationOpen: NotificationOpen) => {
          alert("onNotificationOpened")
        })

The same remote notifications will fire getInitialNotification if opened when the app is closed.

Environment

  1. Application Target Platform: iOS
  2. Development Operating System: MacOS
  3. Build Tools: Xcode
  4. React Native version: "react-native": "0.55.4",
  5. React Native Firebase Version: "react-native-firebase": "^5.0.0-rc4",
  6. Firebase Module:
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
pod 'Firebase/Auth', '~> 5.3.0'
pod 'Firebase/DynamicLinks', '~> 5.3.0'
pod 'Firebase/Performance', '~> 5.3.0'

  1. Are you using typescript?: No

siderakis avatar Sep 22 '18 15:09 siderakis

Same here. Did anyone figure this out yet?

Osebrian avatar Oct 07 '18 22:10 Osebrian

Same issue here.

` pod 'Firebase/Core', '~> 5.3.0' pod 'Firebase/Database', '~> 5.3.0' pod 'Firebase/Auth', '~> 5.3.0' pod 'Firebase/Messaging', '~> 5.3.0' pod 'Firebase/Functions', '~> 5.3.0' '

{ "react-native": "0.55.2", "react-native-firebase": "^4.3.8" }

ThomasAbbink avatar Oct 09 '18 09:10 ThomasAbbink

We have the same problem. In Debug we can make this work if we:

  • launch the app in debug
  • reload the bundle once after the app has successfully launched
  • send notification and the callbacks work.

However, in release mode, or in debug mode on initial launch onNotificationOpened, does not get called.

Unfortunately this is a pretty debilitating bug...

zyskowsk avatar Oct 11 '18 08:10 zyskowsk

Duplicate of #1149 and many others, lets track all onNotificationOpened issues in one place please (same platform or not please discuss on #1149).

Thanks

Salakar avatar Oct 23 '18 12:10 Salakar