I have solved the issue on iOS 16.4 running on a real device by adding a manifest file. I have written about it in more detail here: https://developer.apple.com/forums/thread/725772?answerId=750249022#750249022
Post
Replies
Boosts
Views
Activity
I was experiencing the same issue. I was able to solve it by adding a manifest.json file with the "display": "standalone" directive, which I had omitted completely and link to the file in the html file.
After deploying the fix, making sure to clear the website data (cache) for the site in Safari settings and adding the site to the Home Screen, it worked. No need to enable Web Push and Notifications in Safari Experimental Features.
manifest.json
{
"name": "pwa-ios-test",
"short_name": "pwa-ios-test",
"description": "pwa-ios-test",
"display": "standalone",
"theme_color": "#ffffff",
"icons": [
{
"src": "pwa-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "pwa-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "pwa-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
]
}
index.html
<!DOCTYPE html>
<html>
<head>
<link href="manifest.json" rel="manifest">
...
</html>