N
Nuxt5mo ago
Gnomeuel

PWA Detection Logic Not Working on Apple TestFlight

Hi everyone, I'm currently facing an issue with my Progressive Web App (PWA) when it's distributed via Apple TestFlight. The logic I've implemented to detect if the app is installed or being used in a browser works perfectly in normal scenarios but fails when the app is running through TestFlight. Here is a simplified version of the detection logic I'm using:
onBeforeMount(() => {
if (
(window.navigator as any).standalone ||
window.matchMedia('(display-mode: standalone)').matches
) {
settings.setIsInstalled(true);
return;
}

settings.setIsInstalled(false);
});
onBeforeMount(() => {
if (
(window.navigator as any).standalone ||
window.matchMedia('(display-mode: standalone)').matches
) {
settings.setIsInstalled(true);
return;
}

settings.setIsInstalled(false);
});
This works as expected in browsers and when the PWA is installed on both iOS and Android. However, when running the PWA via TestFlight, it doesn't detect the app as being installed.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server