Closed triplehenry closed 7 years ago
@triplehenry I had the same issue with iOS. Sending tags on Android works fine. If you follow the instructions here to update the OneSignal native code to version 2.5.4, sendTags
and sendTag
will both work consistently. Hope that helps save you the hours and hours I spent trying to figure this out.
@alexgsummer u da real MVP
@alexgsummer Thank you so much. It worked!
@avishayil would it be possible to update the default SDK that gets installed to node_modules to fix this bug for iOS?
Yes, I will update the SDK.
Dear, alexgsummer. Should I update the SDK manually? I changed "react-native-onesignal": "^3.0.4" to "react-native-onesignal": "^2.5.4" and run "npm install", but not work correctly.
@smart-mickey, updating the version in your package.json and running npm install
doesn't seem to update the files in the XCode project, so updating the SDK manually should fix your issue. Also, the version mentioned above (2.5.4) is referencing the OneSignal Native SDK and not this project.
@avishayil, what's the recommended steps to get XCode to "see" the new SDK files in node_modules after you bump the version? Is it necessary to manually copy the files?
thanks for your quick reply. I will unlink and uninstall latest version of this package and reinstall @2.5.4. Do you think this will work?
Hello I've installed the latest version (3.0.4). But sendTag or sendTags methods are not working. I can't see changes on onesignal dashboard. I tried to get them with getTags method. it returns an empty object.
The version for this lib has not been bumped nor has an update been published to NPM since merging in the updated OneSignal iOS SDK files. Our work-around is still my suggestion above to manually update the OneSignal SDK files. If you don't want to do that, you could also temporarily point to the master branch in your package.json:
"react-native-onesignal": "geektimecoil/react-native-onesignal#master"
What is the status on this? sendTag is not working with my project that runs OneSignal@3.0.5
+1
I am calling
OneSignal.sendTags({...})
on the callback forids
when there is a value for pushToken. This happens during the signup process when the user initially accepts the push notification prompt which gets triggered byOneSignal.registerForPushNotifications()
. Yet, when I check the dashboard, I do not see the tags being saved. I've noticed that sometimes if I restart the app, the tags would show up on the dashboard due to the same callbacks. Not sure if there is a race condition or if I'm calling sendTags incorrectly. Thanks in advance for your help.