Please refer to the following articles listed below for the iOS PWA functionality
With iOS 11.3, Apple has silently added support for the basic set of new technologies behind the idea of “Progressive Web Apps” (PWAs). It’s time to see how they work, what are their abilities and challenges, and what do you need to know if you already have a published PWA.
https://medium.com/@firt/progressive-web-apps-on-ios-are-here-d00430dee3a7
PWA on iOS isn't automatically available like on Android, there are some additional settings you will have to change to allow for the popup to show on Safari iOS.
Additionally from the following stackoverflow Link, there is a link to making it available for iOS without the user having to change their settings.
Answer from Akshay Nair on Stack Overflowprogressive web apps - Is "Add to home screen" feature of PWA supported in iOS? - Stack Overflow
ios PWA How to open external link on mobile default safari(not In app browser)
PWA on iOS
With iOS 17.4 beta in the EU, no browser can install PWA apps, even Safari
Does Safari support PWA?
Does Apple support PWA?
Does iOS support PWA push notifications?
Videos
Please refer to the following articles listed below for the iOS PWA functionality
With iOS 11.3, Apple has silently added support for the basic set of new technologies behind the idea of “Progressive Web Apps” (PWAs). It’s time to see how they work, what are their abilities and challenges, and what do you need to know if you already have a published PWA.
https://medium.com/@firt/progressive-web-apps-on-ios-are-here-d00430dee3a7
PWA on iOS isn't automatically available like on Android, there are some additional settings you will have to change to allow for the popup to show on Safari iOS.
Additionally from the following stackoverflow Link, there is a link to making it available for iOS without the user having to change their settings.
This code helps me to show the install popup on iPhone.
if (window.matchMedia('(display-mode: standalone)').matches) {
console.log('display-mode is app installed');
}
else{
console.log('display-mode is browser');
}
we can show a custom popup to install.
Thank you
Works only in iOS 17, I couldn't find a way to do it in earlier versions of iOS.
window.location = `x-safari-${window.location.href}`;
So the URL should look like x-safari-https://domain
It looks like the in-app browser also blocks the second attempt (if a user clicks 'don't open safari' the first time), so rendering a link with this URL instead might be a better solution.
It's a bit hard to answer this question (and all the comments) as the use case isn't overly clear, but here goes...
On mobile devices, an "in-app browser" is NOT the same thing as a Progressive Web App running in full-screen mode.
If an iOS app runs and then displays HTML content inside of it, it's utilizing UIWebView or WKWebView. However, in the case of a PWA it's already running in Safari as a "full screen" experience. Defining which you're trying to break links out of is extremely important as they function differently.
target="_blank" will typically break a link out of a page using WebView. I believe this is the default functionality for links outside the current domain as well.
An "installed" PWA is running in something called "Stand Alone" mode. This makes it full screen and removes navbars, etc. As of this writing, Safari doesn't support the fullscreen API that other browsers are implementing. Chrome uses the App manifest file to determine this functionality. Safari basically ignores the manifest in favor of proprietary meta tags.
In this case <meta name="apple-mobile-web-app-capable" content="yes"> tells Apple to make the page a stand-alone app. Try setting content="no" (Safari caches things heavily so you might need to force a refresh) on the pages that should break out of stand-alone mode. You can check to see what mode the page thinks it's in by using this javascript boolean window.navigator.standalone.
Or you can use javascript to force a "new window" in Safari as long as you're targeting a different subdomain or HTTP instead of HTTPS.
// if app is hosted from https://example.com
if (("standalone" in window.navigator) || window.navigator.standalone ) {
window.open('http://example.com/page', '_blank');
}
Finally, Apple uses some special URL strings to cause native apps to handle some actions like emails, phone numbers, and youtube videos. You might be able to "hack" that functionality to get safari to open your link.
Hey 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