Issue
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.
Solution
In your terminal type: "Expo login"
Sign in with your username//password.
Run the project again make sure you use a real device.
Answered By - Erik Dreifaldt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.