混合应用开发的模式,越来越被各大公司热推,凭借其快速迭代,跨平台的特性,已经变得炙手可热, 那个为了能更贴合于Native效果,有更好的用户体验,cordova的配置更是关键,今天就来分析一下cordova常用的配置属性。
首先,我们来看一个配置文件:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phd.demoProject" version="0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>MyDemoProject</name>
<description>
MyDemoProject
</description>
<author email="jiangbophd@126.com" href="http://blog.youkuaiyun.com/jiangbo_phd">
MyDemoProject
</author>
<content src="index.html" />
<!-- cordova-plugin-whitelist -->
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<access origin="*" />
<allow-intent href="tel:*"/>
<access launch-external="yes" origin="tel:*" />
<access launch-external="yes" origin="http:*" />
<access launch-external="yes" origin="https:*" />
<!-- stop uiwebview from bouncing in iOS -->
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<!-- android ice cream sandwich -->
<preference name="android-minSdkVersion" value="14" />
<!-- cordova-plugin-statusbar -->
<preference name="StatusBarBackgroundColor" value="#000000" />
<!-- prevent web storage backups -->
<preference name="BackupWebStorage" value="none" />
<!-- cordova-plugin-splashscreen -->
<preference name="SplashScreen" value="screen" />
<preference