-
Notifications
You must be signed in to change notification settings - Fork 378
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
One signal conflict with react-native-push-notification #605
Comments
@manxhong When you say the button does not respond, I am not sure what you mean? Can you send a screenshot perhaps? |
@Nightsd01 when I click the notification action button (from react-native-ios-notification-actions library) to invoke a function, that function is not running. |
@manxhong I notice you said you initialize the SDK in the AppDelegate and in That may not fix the issue but I'll be looking into it shortly. |
@Nightsd01 sorry for the misleading, I didn't initialize oneSignal SDK in AppDelegate, I only added these line in AppDelegate for local notification.
|
Hello, I have the same problem, if I use react-native-push-notification only, the didReceiveRemoteNotification function from the AppDelegate.m gets called (I've put a breakpoint inside the function for testing purpose) and everything works as expected. Now, if I install OneSignal SDK and initialise it from the JS code, the didReceiveRemoteNotification function is not triggered anymore when I receive a regular notification. This was working previously with the 3.0.x version of the SDK and the initialisation via the AppDelegate.m instead of the initialisation from the JS code. More disturbing, if I install the SDK, setup the app extension but does not initialise the SDK at all, regular notifications are still not working and the didReceiveRemoteNotification is still not triggered. I managed to receive the notifications back by implementing "UNUserNotificationCenter delegate " functions in the AppDelegate (which is not needed if OpenSignal SDK is not installed) but only when the app is in foreground... Any idea where this might come from? |
I'm facing the same issue |
This is a big problem, since OneSignal does not support local notifications. |
Thanks for your patience everyone. @25matt12 , and Matthieu thanks for your workaround. Just so people know, since iOS 10 the Folks really have three options here:
|
Hello, I have the same problem, didReceiveRemoteNotification function is not triggered when I receive a local notification. I have done the following and now it works very well /*- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification )notification -(void)userNotificationCenter:(UNUserNotificationCenter *)center UILocalNotification *notification=[[UILocalNotification alloc] init]; |
@AbdelrhmanFathy @25matt12 is still working for you? I can't for the life of me to make to work with the last version :( @rgomezp Could you guys try to provide a working example. I am pinging everyone but I get no reply. I'm really considering switching from OneSignal (I'm a paying customer) because of this issue and lack of support :( |
Hello all, |
@rborn Sorry but I'm not maintaining the project anymore however I can tell you that it was still working in November 2019. |
@25matt12 I made it work in the end somehow, thanks |
Description:
Hi, I am trying to have local and remote notification for my apps. I am using react-native-push-notification for local notification and react-native-ios-notification-actions for action buttons (because OneSignal P2P notification doesn't provide action button). The local notification with action buttons work fine but after OneSignal.init() the notification actions button won't respond but only showing with the local notification.I tried to remove One signal SDK by rm-rf node_modules/react-native-onesignal, and the action buttons work fine without the One signal SDK. I am wondering is there a way that both libraries can work together without conflict?
Environment
3.2.6npm install --save react-native-onesignal
react-native link react-native-onesignal
Steps to Reproduce Issue:
Anything else:
I have been working on this issues for 2 days, and also looked into IOS native code to fix the issues but no luck. Thanks for advance for your help!
The text was updated successfully, but these errors were encountered: