-
Notifications
You must be signed in to change notification settings - Fork 375
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
Clash with expo-notifications (for local notifications) on iOS #1480
Comments
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 |
@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 |
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 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 |
Hi there, I've got the exact same issue. Any news about this @brismithers ? |
Same here. Any suggestions? |
Hello there! Apologies that this issue has gone stale. Can anyone still experiencing this on the latest sdk release please open a new issue with updated reproduction steps? We will be happy to assist. Thanks! |
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 #958 (comment):
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
The text was updated successfully, but these errors were encountered: