I am getting a push notification on actual device that is a development build and push notifications are working fine both when sending and receiving and using expo push notification tool. But, when I submit the app to the app store and test on testflight, No expo token is generated. It was working fine with expo sdk 48 but I recently upgraded to sdk 50 and now the token is not being generated.
let token; let projectId; if (Platform.OS === "android") { await Notifications.setNotificationChannelAsync("default", { name: "default", importance: Notifications.AndroidImportance.MAX, vibrationPattern: [0, 250, 250, 250], lightColor: "#FF231F7C", }); } if (Device.isDevice) { const { status: existingStatus } = await Notifications.getPermissionsAsync(); let finalStatus = existingStatus; if (existingStatus !== "granted") { const { status } = await Notifications.requestPermissionsAsync(); finalStatus = status; } if (finalStatus !== "granted") { alert("Failed to get push token for push notification!"); return; } projectId = Constants.expoConfig.extra.eas.projectId; token = ( await Notifications.getExpoPushTokenAsync({ projectId: projectId, }) ).data; console.warn("projectId", projectId); console.log("token", token); console.log("projectId", projectId); } else { alert("Must use physical device for Push Notifications"); } return token;} ````. Does anyone know what the problem can be?