I am working on react native Expo's Push Notifications. I just started and unable to get the Expo Push notification token. I added the following code:
token = await Notifications.getExpoPushTokenAsync();
console.log(token);
and getting the error "[Unhandled promise rejection: Error: The Expo push notification service is supported only for Expo projects. Ensure you are logged in to your Expo developer account on the computer from which you are loading your project.]".
I am running the project in the Expo App and I have created an account on Expo but still not getting the token. Expo experts, please guide.
In your terminal type: "Expo login"
Sign in with your username//password.
Run the project again make sure you use a real device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With