I'm currently developing a React Native app using Expo but encountering issues with obtaining a valid token, which in turn affects the push notification functionality.
Upon pasting the generated token on , an error message stating "This is not a valid Expo push token." pops up. While notifications function properly on Expo Go, they fail to work on TestFlight.
The code snippet in question is as follows:
import * as Device from "expo-device";
import * as Notifications from "expo-notifications";
import React, { useEffect, useRef, useState } from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
...
... (the remaining code snippet continues)