Open jacklj opened 1 year ago
Hi @jacklj thank you for reporting, we will look into this and let you know what we find. Can you show where you initialize the OneSignal SDK in relation to your didFinishLaunchingWithOptions
code above?
@jacklj I did a quick edit to my initial message and not sure you saw it. Can you show where you initialize the OneSignal SDK in relation to your didFinishLaunchingWithOptions
code above? Thanks!
Thanks @brismithers, didn't see the update.
We followed the docs here https://documentation.onesignal.com/docs/react-native-sdk-setup - there is no OneSignal setup code in AppDelegate, just the OneSignalNotificationServiceExtension and then the initialization code in Javascript (in App.js).
@jacklj confirming that I am seeing the same thing, working through why/what needs to change
Hey @jacklj I don't have a good update, just letting you know I continue to try to figure this out. For context, I'm having trouble getting expo-notifications
without onesignal-react-native
to deliver a local notification while the app is in the foreground (local notifications while in background are delivered successfully). I think I'm running up against this issue.
I will mention one thing. In your original report you indicated the OneSignal notification received handler does not receive control when a local notification is received. I can say this is expected behavior. The OneSignal notification received handler will only get control for notifications sent by OneSignal.
So you must rely on expo's notification received handler for local notifications. And this is where I am currently stuck :).
Will keep at it!
I have similar problem when I have a both installed a listeners form expo-notifications
don't work, any progres on this issue ?
Hi there,
I've got the exact same issue. Any news about this @brismithers ?
Same here. Any suggestions?
What happened?
I've got react-native-onesignal installed on a bare React Native project, and I've since installed expo-notifications to fire local notifications. I get this warning on iOS startup (it comes from this code here:
I believe this is because OneSignal already sets its own delegate.
The result is: local notifications get delivered, but the foregrounded app notification handler doesn’t fire (nor does expo-notifications’ one).
To fix, I've tried to follow the advice given by the expo-notifications warning -
set the delegate to an instance of EXNotificationCenterDelegate manually afterwards.
:This builds successfully but then local notifications don't work at all.
This should be compatible with OneSignal, see here https://github.com/OneSignal/react-native-onesignal/issues/958#issuecomment-600267864:
Any ideas how to make expo-notifications work with OneSignal on iOS (it works fine on Android)? Thanks
Steps to reproduce?
What did you expect to happen?
They should be compatible, as onesignal-react-native doesn’t implement local notifs, so we need to be able to use other libraries to implement them
React Native OneSignal SDK version
Release 4.5.0
Which platform(s) are affected?
Relevant log output
Code of Conduct