Hey I am trying to add a tag to my onesignal user if something happens in my app, but it doesn't work, I just get this warning:
TypeError: _reactNativeOnesignal.default.push is not a function
I am trying to do this from a different file, so I just import onesignal on top as usual and then my code looks like this:
OneSignal.push(function() {
OneSignal.sendTags({
userId: res.auth
})
.then(function(tagsSent) {
// Callback called when tags have finished sending
console.log("tag is set: ", tagsSent);
console.log("tag shit");
})
.catch(err => {
console.log("error", err);
});
});
and when the app hits this point i get that warning and the tag is not set. Why is that? other than that the notifications are working as expected