Skip to content

PWA Not Persistant (iOS) #187

@MentalGear

Description

@MentalGear

Thanks for the great framework,

I'm using it with svelte and generated the splitview template from the cli. When testing the PWA on iOS, I noticed that unlike other webapps, it's not truly a PWA as I can't open it anymore (page won't load) after closing it once.

System:
iOS 15

Steps to Reproduce:

  • 'Add to HomeScreen'
  • open the PWA while online to load it
  • close the PWA (completely)
  • go offline
  • open PWA again
  • 'Can't open page' is shown in webview

package.json

  "scripts": {
    "start": "npm run dev",
    "dev": "cross-env NODE_ENV=development vite",
    "build": "cross-env NODE_ENV=production vite build && npx workbox generateSW workbox-config.js",
    "serve": "vite preview",
    "PWA-preview": "npm run build && npm run serve"
  },

config

{
  "type": ["web", "pwa"],
  "name": "welcome",
  "framework": "svelte",
  "template": "split-view",
  "cssPreProcessor": "scss",
  "bundler": "vite",
  "theming": {
    "customColor": true,
    "color": "#FFF",
    "darkTheme": true,
    "iconFonts": false,
    "fillBars": false
  },
  "customBuild": false
}

workbox config

module.exports = {
  globDirectory: 'www/',
  globPatterns: ['**/*.{woff,woff2,js,css,png,jpg,svg,html}'],
  /* pass array of globs to exclude from caching */
  globIgnores: [],
  ignoreURLParametersMatching: [/^utm_/, /^fbclid$/],
  swDest: 'www/service-worker.js',
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions