Skip to content

Commit 686ba68

Browse files
committed
fix: use pwa module for ios splash screen
1 parent c6fa52f commit 686ba68

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

‎src/parts/meta.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ export const setupMeta = () => {
77
{name: 'color-scheme',content: 'light dark'},
88
{name: 'format-detection',content: 'telephone: no'},
99
{name: 'msapplication-tap-highlight',content: 'no'},
10-
// add to homescreen for ios
11-
{name: 'apple-mobile-web-app-capable',content: 'yes'},
12-
{name: 'apple-mobile-web-app-title',content: 'Ionic App'},
13-
{name: 'apple-mobile-web-app-status-bar-style',content: 'black'},
1410
]
1511

1612
nuxt.options.app.head.meta=nuxt.options.app.head.meta||[]

‎src/parts/pwa.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ import { provider } from 'std-env'
44
exportconstsetupPWA=async()=>{
55
constnuxt=useNuxt()
66

7+
nuxt.options.pwa||={}
8+
79
if(provider==='stackblitz'){
8-
;(nuxt.optionsasany).pwa=(nuxt.optionsasany).pwa||{}
9-
;(nuxt.optionsasany).pwa.icon=false
10+
nuxt.options.pwa.icon=false
1011
console.warn(
1112
'Disabling PWA icon generation as `sharp` is not currently supported on StackBlitz.'
1213
)
1314
}
15+
16+
// Generate splash screens for iOS
17+
nuxt.options.pwa.meta||={}
18+
nuxt.options.pwa.meta.mobileAppIOS??=true
19+
1420
awaitinstallModule('@kevinmarrec/nuxt-pwa')
1521
}

‎tsconfig.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"extends": "./playground/.nuxt/tsconfig.json"
2+
"extends": "./playground/.nuxt/tsconfig.json",
3+
"compilerOptions": {
4+
"types": [
5+
"@kevinmarrec/nuxt-pwa"
6+
]
7+
}
38
}

0 commit comments

Comments
 (0)