iOS - Safari currently doesn't support a Web app install banner, like in Android - Chrome.
There is no way to programmatically trigger install banner in Android as well, except for the case when you catch the beforeInstallPrompt and use that to show the banner.
In the linked answer, you can check on the alternate option on how to show in app banner to guide user to add to home screen. Here is some code example for the same, which is iOS specific (look under #PROTIP 3).
Answer from Anand on Stack OverflowHey all, I'm considering going fully on React and use PWA for both iOS and Android.
It seems Android makes it a bit easier, do you happen to know by any chance the pitfalls of using PWA on iOS? Specifically in these areas:
- User installation.
- Notifications.
- Geolocation.
Any insight is appreciated
PWA: How to programmatically trigger : "Add to homescreen"? on iOS Safari
progressive web apps - iOS PWA: How to (re-)enable pull to refresh? - Stack Overflow
WTF is going on with PWA and iOS 26 (and iOS 26.1)? : Frontend
Generate iOS PWA splash screens on the fly! No more adding multiple apple-touch-startup-image tags to <HEAD>. : npm
Videos
iOS - Safari currently doesn't support a Web app install banner, like in Android - Chrome.
There is no way to programmatically trigger install banner in Android as well, except for the case when you catch the beforeInstallPrompt and use that to show the banner.
In the linked answer, you can check on the alternate option on how to show in app banner to guide user to add to home screen. Here is some code example for the same, which is iOS specific (look under #PROTIP 3).
For now, Apple doesn't give the possibility to make this "Add to home screen" experience easy.
You can provide a tooltip explanation to your users though, for IOs users:
Details explained here: https://web.archive.org/web/20200809175125/https://www.netguru.com/codestories/few-tips-that-will-make-your-pwa-on-ios-feel-like-native
in the section: PROTIP 3: Create an “Add to home screen” popup yourself!
Seems like pull to refresh is explicitly disabled for standalone and fullscreen PWA apps on iOS.
I ended up reimplementing it with a standalone check, pulltorefresh.js, and some javascript glue.
const standalone =
navigator.standalone ||
window.matchMedia("(display-mode: standalone)").matches;
if (!standalone) {
return; // not standalone; no pull to refresh needed
}
PullToRefresh.init({
onRefresh() {
location.reload();
},
});
Based on @Joonas, for react.
npm install pulltorefreshjs
npm install @types/pulltorefreshjs
I added this to my root file (main.tsx)
import PullToRefresh from "pulltorefreshjs"
...
const standalone = window.matchMedia("(display-mode: standalone)").matches
if (standalone) {
PullToRefresh.init({
onRefresh() {
window.location.reload()
},
})
}
not sure how it will affect Android devices though.