I have app on Flutter, and use Firebase for push messages. Unfortunately I get empty push Token from Firebase in app from TestFlight build, but I always receive it when Run and Debug app in VSCode.
Versions, code of the app the same in TestFlight and VSCode.
On Android push token also always receives.
APNS key is not expired.
Where is the problem?
try {
pushToken = (await FirebaseMessaging.instance.getToken()) ?? "";
} catch (ex, stack) {
// some error
};
messaging.onTokenRefresh.listen((token) => pushToken = token);