Skip to content

Commit 6f0808f

Browse files
committed
feat: set to use the WKWebview for ios
1 parent 92f49c3 commit 6f0808f

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

generator/index.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@ module.exports = (api, options, rootOptions) => {
55
'cordova-build': 'vue-cli-service build --dest www'
66
},
77
dependencies: {
8+
'cordova-android': '^7.1.0',
89
'cordova-browser': '^5.0.3',
9-
'cordova-plugin-whitelist': '^1.3.3',
10-
'cordova-plugin-device': '^2.0.1'
10+
'cordova-ios': '^4.5.4',
11+
'cordova-plugin-device': '^2.0.1',
12+
'cordova-plugin-ionic-webview': '^1.2.0',
13+
'cordova-plugin-whitelist': '^1.3.3'
1114
},
1215
cordova: {
1316
plugins: {
14-
'cordova-plugin-whitelist': {},
15-
'cordova-plugin-device': {}
17+
'cordova-plugin-device': {},
18+
'cordova-plugin-ionic-webview': {},
19+
'cordova-plugin-whitelist': {}
1620
},
1721
platforms: [
18-
'browser'
22+
'android',
23+
'browser',
24+
'ios'
1925
]
2026
}
2127
})

generator/templates/config.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Apache Cordova Team
99
</author>
1010
<content src="index.html" />
11-
<access origin="*" />
11+
<access allows-local-networking="true" origin="*" />
1212
<allow-intent href="http://*/*" />
1313
<allow-intent href="https://*/*" />
1414
<allow-intent href="tel:*" />
@@ -23,8 +23,13 @@
2323
<platform name="ios">
2424
<allow-intent href="itms:*" />
2525
<allow-intent href="itms-apps:*" />
26+
<!-- INFO: If you want to prevent scrolling, set false -->
27+
<preference name="ScrollEnabled" value="true" />
2628
</platform>
27-
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
2829
<plugin name="cordova-plugin-device" spec="^2.0.1" />
30+
<plugin name="cordova-plugin-ionic-webview" spec="^1.2.0" />
31+
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
32+
<engine name="android" spec="^7.1.0" />
2933
<engine name="browser" spec="^5.0.3" />
34+
<engine name="ios" spec="^4.5.4" />
3035
</widget>

0 commit comments

Comments
 (0)