UPDATE to my previous post!
As it turns out – after a bit of fiddling – it is possible to define which icon shall be taken for the app icon in the dock. As I and others have already found out the hard way, using the legacy <link rel="apple-touch-icon" .../>
doesn't work.
What works is to provide a properly configured manifest file (e.g. /app.webmanifest) that is served with the application/manifest+json
content type). The icon is then listed in the "icons" section. Both 512x512 and 1024x1024 sized PNG and WEBP files worked (no transparency used, full square). And if you provide an SVG file ("sizes": "any")
then this seems to take preference, even if you change the order within "icons"
. My web server also serves all image files with the appropriate respective content type.
Here's the manifest I that worked for me (with the SVG icon being chosen by Safari):
| { |
| "short_name": "Saturn PWA", |
| "name": "Saturn Progressive Web App", |
| "icons": [ |
| { |
| "src": "/_static/_/images/pwa-icon.svg", |
| "type": "image/svg+xml", |
| "sizes": "any" |
| }, |
| { |
| "src": "/_static/_/images/pwa-icon-512.webp", |
| "type": "image/webp", |
| "sizes": "512x512" |
| }, |
| { |
| "src": "/_static/_/images/pwa-icon-1024.webp", |
| "type": "image/webp", |
| "sizes": "1024x1024" |
| }, |
| { |
| "src": "/_static/_/images/pwa-icon-512.png", |
| "type": "image/png", |
| "sizes": "512x512" |
| }, |
| { |
| "src": "/_static/_/images/pwa-icon-1024.png", |
| "type": "image/png", |
| "sizes": "1024x1024" |
| } |
| ], |
| "id": "Saturn", |
| "start_url": "/", |
| "display": "minimal-ui", |
| "theme_color": "#1A2733" |
| } |