Hi,
great package so far.
I have a question which is related with an issue:
When i open the app for the first time (after install), the token is not generated. The token is null.
Which is the best approach to get the token if the onRegister method returns token as null?
Do i have to recall this function in other screen of the app?
Please help me with some code examples.
Maybe something like:
PushNotification.onRegister((token)=>{ console.log(token); });
Thanks,
Mihai
Can someone please advise/help me how to proceed in my case?
Same here
In XCode Capabilities tab you should turn on Push notifications
Same here, setup all as described, allowed push notifications but token is still null..
@mikhi have you found a way to make this work?
Are you using a real device ? Because on a simulator if will always be null apparently but I jsut tried on an iphone 6 and I got the TOKEN working.
My issue was caused by not turning on the Push notifications capability in XCode, but however iOS is a bit harder to setup than android, make sure the following:
Hope this helps.
@hugoh1995 Yup its already working.. I use Reactotron for logging but somehow it doesn't show the token.. I just see it when I do console.log! I think its an issue on Reactotron... Thanks anyway..
same here in android . how did you solve it?
I log it via the console..
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
Can someone please advise/help me how to proceed in my case?