-
Notifications
You must be signed in to change notification settings - Fork 287
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
getInitialNotification is always returning null #24
Comments
Same here, tried with 3 different methods (RNCPushNotificationIOS, RNFirebase & RN-Push-Notification) and unable to get this initial notification when I click on notification to open app. It seems there is a problem there... Hope someone will help us ! :) |
yep, the promise always returns null after a cold start. |
Same here:
Appreciate the help! |
Same here. It always returns null. |
anyone found a workaround? |
I found this to be a problem when the Scheme's Build Configuration is set to Debug but not when it's set to Release. I'm using React Native 0.59.9 and not using this library yet. DetailsAt least in my case, through some digging in Objective-C, I found that two React Native bridges were created when doing a Debug build, while only one was created for a Release build. For Debug, the initial notification was included in the first bridge's I then changed the Scheme's Build Configuration to Release and tried again. Only one React Native bridge was created and |
Thanks for the input. Maybe it's because I am using RN 0.61.1, but even in release configuration getInitialNotification is always returning null. |
Seeing the same thing on RN 0.59.8. |
Only solution is to use react-native-firebase, but i don't want to introduce it only for detecting opening of push notifications and it has its own problems, like receiving device token etc. Libraries like zo0r/react-native-push-notification also don't work because they depend on this project here. If someone has a hint, what the underlying problem could be, I'm happy to take a look into it. |
I had this issue and solved it, at least enough for my needs. On RN 0.59.10, running locally on a device using a dev/debug build (hot reload, debugger running) all calls to Obviously this isn't ideal. It would be great to be able to received initial notifications on a dev build with debugger and hot reload working. I'm wondering if this isn't really a bug but is actually an issue with how react-native loads the js bundle. In my dev build, whenever the app is opened from closed state, the js bundle is redownloaded. Perhaps this is in essence opening the app twice, and the initial notification is not available by the time it opens fully. |
Same here. I'm trying to find any solutions. I read both Obj-C and JS, and found this line: I don't know Obj-c much, but do you think this change will make a difference? - NSMutableDictionary<NSString *, id> *initialNotification =
- [self.bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] mutableCopy];
+ [[self.bridge.launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey] mutableCopy]; |
Same here, in RN 61.5. Hope someone fix this |
disabling |
getInitialNotification only returns data when the app is starting from cold boot. Additionally it won't return data in development build, but it will in release build. |
Has only figured out a workaround? I'm using this library in conjunction with aws amplify (which requires the community version). Prior to a few weeks ago, we we're using an older version of amplify (which used the built in PushNotificationIOS) and this worked fine. Haven't figured out a way yet to get this to return anything but null (debug or release). |
Did you check notification from coldboot? This method only returns notification which was fired while coldbooting, it won't show other notifications. Use 'notification' event for that. |
@dominiczaq Yes, that's the one that returns null. Notifications coming in while mobile locked or in the background are okay. The getInitialNotification event is fired, but the data is null. |
We ended up writing native code to handle this since it wasn't working with the library. Hope this helps. JS Helper Swift Objective-C |
@shanemduggan Do you think you could post a gist with this code? I tried to implement, but I'm running to an issue. I'm not super versed in obj-c / swift so that's probably the problem. |
@opula I'm not well versed in it either but I threw a gist together that should be more helpful. The swift and obj-c files go in 'ios/app name/Native' folder. here ya go - https://gist.github.com/shanemduggan/b22c60fa1d0bacf364c91e83efe0926c |
Some (rather rude! yet still disregarded and closed-as-stale) comments [1] on wix/react-native-notifications report that it's a shame to see a decrease in activity from the maintainers, since it's the only viable cross-platform library for RN push notifications. But we don't even use it in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems strange to have two different libraries doing work to support push notifications on iOS. See also discussion [2]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of `react-native-notifications` [3] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [4] from RN v0.60 to complete our setup. Some parts were missing, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. 3. Change the bit under the comment "Called when a notification is delivered to a foreground app." to correctly call the completion handler with UNNotificationPresentationOptions instead of UNAuthorizationOptions. N.B.: Also, remove the options that ask it to play a sound and show an alert, as these aren't part of the current behavior. That just leaves updating the badge count. 4. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 5. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 6. Do various housekeeping things like removing the libdef. 7. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [5], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 8. On Android, test that notifications appear (regardless of closed/background/foreground state) and navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [3]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [4]: https://reactnative.dev/docs/0.60/pushnotificationios [5]: react-native-push-notification/ios#24 (comment)
Some (rather rude! yet still disregarded and closed-as-stale) comments [1] on wix/react-native-notifications report that it's a shame to see a decrease in activity from the maintainers, since it's the only viable cross-platform library for RN push notifications. But we don't even use it in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems strange to have two different libraries doing work to support push notifications on iOS. See also discussion [2]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of `react-native-notifications` [3] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [4] from RN v0.60 to complete our setup. Some parts were missing, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. 3. Change the bit under the comment "Called when a notification is delivered to a foreground app." to correctly call the completion handler with UNNotificationPresentationOptions instead of UNAuthorizationOptions. N.B.: Also, remove the options that ask it to play a sound and show an alert, as these aren't part of the current behavior. That just leaves updating the badge count. 4. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 5. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 6. Do various housekeeping things like removing the libdef. 7. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [5], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 8. On Android, test that notifications appear (regardless of closed/background/foreground state) and navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [3]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [4]: https://reactnative.dev/docs/0.60/pushnotificationios [5]: react-native-push-notification/ios#24 (comment)
Some (rather rude! yet still disregarded and closed-as-stale) comments [1] on wix/react-native-notifications report that it's a shame to see a decrease in activity from the maintainers, since it's the only viable cross-platform library for RN push notifications. But we don't even use it in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems strange to have two different libraries doing work to support push notifications on iOS. See also discussion [2]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of `react-native-notifications` [3] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [4] from RN v0.60 to complete our setup. Some parts were missing, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. 3. Change the bit under the comment "Called when a notification is delivered to a foreground app." to correctly call the completion handler with UNNotificationPresentationOptions instead of UNAuthorizationOptions. N.B.: Also, remove the options that ask it to play a sound and show an alert, as these aren't part of the current behavior. That just leaves updating the badge count. 4. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 5. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 6. Do various housekeeping things like removing the libdef. 7. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [5], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 8. On Android, test that notifications appear (regardless of closed/background/foreground state) and navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [3]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [4]: https://reactnative.dev/docs/0.60/pushnotificationios [5]: react-native-push-notification/ios#24 (comment)
Some (rather rude! yet still disregarded and closed-as-stale) comments [1] on wix/react-native-notifications report that it's a shame to see a decrease in activity from the maintainers, since it's the only viable cross-platform library for RN push notifications. But we don't even use it in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems strange to have two different libraries doing work to support push notifications on iOS. See also discussion [2]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of `react-native-notifications` [3] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [4] from RN v0.60 to complete our setup. Some parts were missing, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. 3. Change the bit under the comment "Called when a notification is delivered to a foreground app." to correctly call the completion handler with UNNotificationPresentationOptions instead of UNAuthorizationOptions. N.B.: Also, remove the options that ask it to play a sound and show an alert, as these aren't part of the current behavior. That just leaves updating the badge count. 4. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 5. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 6. Do various housekeeping things like removing the libdef. 7. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [5], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 8. On Android, test that notifications appear (regardless of closed/background/foreground state) and navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [3]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [4]: https://reactnative.dev/docs/0.60/pushnotificationios [5]: react-native-push-notification/ios#24 (comment)
wix/react-native-notifications doesn't seem to be maintained [1]. expo-notifications also works on both platforms, but we've decided it's not for us [2]. But we don't even use react-native-notifications in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems non-optimal to have two different libraries doing work to support push notifications on iOS. See also discussion [3]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of wix/react-native-notifications [4] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [5] from RN v0.62 to complete our setup. We hadn't yet done everything in these instructions, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. We did some of this setup in the previous commit. 3. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 4. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 5. Do various housekeeping things like removing the libdef. 6. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [6], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 7. On Android, test that notifications appear (regardless of closed/background/foreground state) and that they navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/1061130 [3]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [4]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [5]: https://reactnative.dev/docs/0.62/pushnotificationios [6]: react-native-push-notification/ios#24 (comment)
Ran into this issue as well. Basically the initial notifications don't seem to be part of the normal flow, but need to be processed in the initial launch method. With this hack I am adding a delay, and firing off the initial notification (including a fake completion method), which should fit into the normal notification listener pattern. Hopefully this works until there's an official fix.
|
I've find sometihng. when i create notification, by localNotificationSchedule or localNotification. i've created notification with userInfo object variable to not null. it comes data in popInitialNotification function! |
wix/react-native-notifications doesn't seem to be maintained [1]. expo-notifications also works on both platforms, but we've decided it's not for us [2]. But we don't even use react-native-notifications in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems non-optimal to have two different libraries doing work to support push notifications on iOS. See also discussion [3]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of wix/react-native-notifications [4] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [5] from RN v0.62 to complete our setup. We hadn't yet done everything in these instructions, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. We did some of this setup in the previous commit. 3. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 4. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 5. Do various housekeeping things like removing the libdef. 6. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [6], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 7. On Android, test that notifications appear (regardless of closed/background/foreground state) and that they navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/1061130 [3]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [4]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [5]: https://reactnative.dev/docs/0.62/pushnotificationios [6]: react-native-push-notification/ios#24 (comment)
wix/react-native-notifications doesn't seem to be maintained [1]. expo-notifications also works on both platforms, but we've decided it's not for us [2]. But we don't even use react-native-notifications in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems non-optimal to have two different libraries doing work to support push notifications on iOS. See also discussion [3]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of wix/react-native-notifications [4] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [5] from RN v0.62 to complete our setup. We hadn't yet done everything in these instructions, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. We did some of this setup in the previous commit. 3. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 4. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 5. Do various housekeeping things like removing the libdef. 6. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [6], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 7. On Android, test that notifications appear (regardless of closed/background/foreground state) and that they navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/1061130 [3]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [4]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [5]: https://reactnative.dev/docs/0.62/pushnotificationios [6]: react-native-push-notification/ios#24 (comment)
On your xcode |
wix/react-native-notifications doesn't seem to be maintained [1]. expo-notifications also works on both platforms, but we've decided it's not for us [2]. But we don't even use react-native-notifications in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems non-optimal to have two different libraries doing work to support push notifications on iOS. See also discussion [3]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of wix/react-native-notifications [4] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [5] from RN v0.62 to complete our setup. We hadn't yet done everything in these instructions, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. We did some of this setup in the previous commit. 3. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 4. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 5. Do various housekeeping things like removing the libdef. 6. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [6], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 7. On Android, test that notifications appear (regardless of closed/background/foreground state) and that they navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/1061130 [3]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [4]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [5]: https://reactnative.dev/docs/0.62/pushnotificationios [6]: react-native-push-notification/ios#24 (comment)
wix/react-native-notifications doesn't seem to be maintained [1]. expo-notifications also works on both platforms, but we've decided it's not for us [2]. But we don't even use react-native-notifications in a cross-platform way; we uprooted the last of the linking logic on Android in 01b33ad. It also seems non-optimal to have two different libraries doing work to support push notifications on iOS. See also discussion [3]. So, let PushNotificationIOS from react-native take responsibility for what this library has been doing. Then, since *that's* deprecated, an upcoming commit will have us using that same code but from react-native-community, where it's maintained. These were my steps: 1. Use the setup instructions for our version of wix/react-native-notifications [4] to tear it down. 2. Use the setup instructions for `PushNotificationIOS` [5] from RN v0.62 to complete our setup. We hadn't yet done everything in these instructions, whether because we didn't need that functionality before, or it wasn't available in earlier RN versions. We did some of this setup in the previous commit. 3. Make tiny, NFC adjustments, mostly to indentation, to smooth the transition to the react-native-community module. 4. Change the call sites to use PushNotificationIOS, and update some types and comments. One part that stands out is the removal of the "consumeBackgroundQueue" hack from c0e2233. Nothing further is necessary, it just works. :) 5. Do various housekeeping things like removing the libdef. 6. On iOS, test that notifications still appear in the closed and background states and that, from either state, they navigate to the corresponding narrow. All works as expected, with one "gotcha": from a cold start, in debug mode, sometimes notifications don't navigate. There's an open issue for this [6], and it seems it doesn't affect release builds. In debug mode, I was able to solve it by disabling "Debug JS Remotely", following one comment there. In any case, `getInitialNotification` is what we've already been using PushNotificationIOS for, for a long time, so this hiccup is not new. 7. On Android, test that notifications appear (regardless of closed/background/foreground state) and that they navigate to the corresponding narrow. [1]: wix/react-native-notifications#519 (comment) [2]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/1061130 [3]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/iOS.20push.20notifications/near/825122 [4]: https://github.com/wix/react-native-notifications/blob/882775fb5/docs/installation.md [5]: https://reactnative.dev/docs/0.62/pushnotificationios [6]: react-native-push-notification/ios#24 (comment)
Does any one have a working GitHub repo . I tried almost all the above fixed none of them didn’t worked . I have tried in release mode also still getinitialnotification always return null. This happens for localnotification and remotenotification |
Did you have any working example for this even in release mode also its returning null alwasy. |
I still could't get this fixed. Can some one look into my test project repo and help me to identify the issue. https://github.com/anishtr4/salesforce_react_pushnotitifcation.git |
@anishtr4 I have find something [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self]; // add this line so finally it will look like :
It will work for me |
This works for me
|
Bug
I can't get
getInitialNotification()
to work, its always returning null. Regular notification when the app is already open is working fine, but if the app is closed and I receive a new notification it will ways return null for me.Environment info
React native info output:
Library version: 1.0.2
Steps To Reproduce
...
A code sample can be found here https://github.com/filipecrosk/react-native-push-notification-ios-test
The text was updated successfully, but these errors were encountered: