Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA Not Persistant (iOS) #187

Open
MentalGear opened this issue Mar 31, 2022 · 0 comments
Open

PWA Not Persistant (iOS) #187

MentalGear opened this issue Mar 31, 2022 · 0 comments

Comments

@MentalGear
Copy link

MentalGear commented Mar 31, 2022

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',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant