PWAs On iOS: Where We Are Now
The confusing details of Apple’s quest to kill the only viable alternative to their App Store
Feb 26, 2024
Update: Apple decided to restore PWAs in the final version of iOS 17.4: https://developer.apple.com/support/dma-and-apps-in-the-eu#dev-qa
The havoc Apple has wreaked upon Progressive Web Apps (PWA) by sabotaging them completely on iOS 17.4 has left developers worldwide frustrated and confused. Not only because it’s an incomprehensible turnaround after their recent improvements in PWA support, but also because the situation Apple left us with is even more puzzling.
In this article, I will attempt to clear up the confusion.
Only in the EU
After the word leaked out that Apple broke PWAs on iOS 17.4 beta 1, confused developers started sharing screen recordings of iPhone simulators running the offending version in which PWAs still installed and ran fine.
Alas, this was not the situation on real iPhones running in the EU.
Apple restricted the change to the EU to comply with DMA regulations and did so through geofencing. It uses the SIM card to determine the user’s location and since software-based simulators don’t have SIM cards, the problem won’t show up there. If you were to run a new iPhone in the EU without a SIM card, PWAs will still work fine and reportedly also when you take out the SIM of an older iPhone and leave it on Flight Mode for 24 hours.
Anyhow, you need a real iPhone with a SIM card located in an EU country to experience the issue.
Installed PWAs are now just bookmarks
Another source of confusion is that you can still “install” a web app on iOS 17.4, meaning: an icon will be placed on the user’s Home Screen but the buck stops here.
When you click the icon, the app will not be opened as a standalone PWA without browser chrome anymore, but just like a regular website. In fact, this is how any website that is not a PWA is opened when you add it to the Home Screen. In other words, a web app that is “installed” is not really installed but just added to the Home Screen as a bookmark.
Currently, this is true for any browser that you can install a PWA with on iOS since all browsers on iOS are Webkit browsers under the hood.
PWA opens as regular website on iOS 17.4
youtube.com
What makes a PWA display like a full screen standalone app is the "display": "standalone" property in the manifest.json file. A website that doesn’t have a manifest.json file and that’s added to the Home Screen is opened in a browser like any other website when the icon is clicked. If it does have a manifest.json file with "display": "standalone" this is simply ignored on iOS 17.4 and the PWA is reduced to a bookmark.
Besides the fact that this completely breaks the UI, it also disables crucial functionality.
No more push notifications
Apple only added support for push notifications a year ago on iOS 16.4. Besides the fact that their implementation is suboptimal, push notifications are only supported for installed PWAs.
That is: installed PWAs running as standalone apps.
Now that “installed” web apps on iOS are no longer standalone apps but just bookmarks of websites, push notifications and badging are no longer supported.
Sorry kid.
No more persistent storage
Persistent storage was only recently added to Safari on iOS but since that is also only available for installed PWAs running in standalone mode, you can say hasta la vista to that feature as well.
PWAs used to be excluded from Apple’s eviction policy that dictates that data stored by any web app that hasn’t been interacted with for 7 days will be evicted, but not anymore for the website bookmarks that PWAs have become on iOS 17.4.
This renders PWAs completely useless and is probably the biggest nail in the coffin that Apple carefully prepared for them.
A security issue?
Apple claims that PWAs installed through non-Webkit browsers are a security risk because iOS provides support for PWAs by directly building on the Webkit security architecture. This security integration takes care of showing permission prompts when the app tries to access the camera for example and provides isolated storage.
Since non-Webkit browsers don’t have this security integration on iOS, installing PWAs through them would not be safe and would even result in PWAs being installed without the user’s permission.
Of course this is nonsense because Apple can build such an integration (like it has had for years on MacOS) but it doesn’t want to. To prevent being forced to build such an integration, it throws up a technical smokescreen and tries to get away with it (but it looks like it won’t).
Separating permissions and data by origin is one of the most important core functionalities of any browser, so there are no security issues other than the ones Apple made up to protect their App Store monopoly.
Apple is trying to kill the only viable alternative to their App Store that’s free from unreasonably high fees and arbitrary admission criteria.
Don’t let them fool you into thinking they’re not.