最終更新:2017-11-26 (日) 03:06:16 (2337d)
Apache Cordova/プロジェクト/config.xml
例
<?xml version='1.0' encoding='utf-8'?> <widget id="com.example.hello" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>HelloWorld</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <author email="dev@cordova.apache.org" href="http://cordova.io"> Apache Cordova Team </author> <content src="index.html" /> <plugin name="cordova-plugin-whitelist" spec="1" /> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <platform name="android"> <allow-intent href="market:*" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform> </widget>
iOS 追加
<engine name="ios" spec="~4.4.0" />
設定
要素 値 widget id アプリの識別子 widget version アプリのバージョン preference 設定値 access origin アプリ内で許可するドメイン content 最初に読み込むHTMLのパス
access
<access origin="http://example.com" /> <access origin="http://foobar.example.com" /> <access origin="http://*.example.com" />