Phonegapを使ってアプリ開発をしているのですが、外部にあるjqueryファイルがbuild時に読み込めていなくjqueryを使った動作が動かないでいます。
調べたところ、Phonegapのconfigファイルのaccessタグを変更すれば指定したところに接続できると書いてあったのですが、書いてもどうもうまくいきません。
やりかたが間違っているのでしょうか。
下がconfigです。
xml
1<?xml version='1.0' encoding='utf-8'?> 2<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 3 <name>HelloCordova</name> 4 <access origin="http://maps.google.com" subdomains="true" /> 5 <access origin="http://googleapis.com" subdomains="true" /> 6 <access origin="http://gstatic.com" subdomains="true" /> 7 <preference name="permissions" value="none" /> 8 <feature name="http://api.phonegap.com/1.0/geolocation" /> 9 <description> 10 A sample Apache Cordova application that responds to the deviceready event. 11 </description> 12 <author email="dev@cordova.apache.org" href="http://cordova.io"> 13 Apache Cordova Team 14 </author> 15 <content src="index.html" /> 16 <plugin name="cordova-plugin-whitelist" spec="1" /> 17 <access origin="*" /> 18 19 <!-- 変更部分 --> 20 <allow-intent href="*" /> 21 <allow-navigation href="*" /> 22 <access origin="http://code.jquery.com/*" subdomains="true" /> 23 <access origin="http://www.city.omura.nagasaki.jp/*" subdomains="true" /> 24 <!--- --> 25 26 <allow-intent href="http://*/*" /> 27 <allow-intent href="https://*/*" /> 28 <allow-intent href="tel:*" /> 29 <allow-intent href="sms:*" /> 30 <allow-intent href="mailto:*" /> 31 <allow-intent href="geo:*" /> 32 <feature name="Device"> 33 <param name="android-package" value="org.apache.cordova.device.Device" /> 34 <param name="ios-package" value="CDVDevice" /> 35 </feature> 36 <platform name="android"> 37 <preference name="Fullscreen" value="true" /> 38 <allow-intent href="market:*" /> 39 </platform> 40 <platform name="ios"> 41 <allow-intent href="itms:*" /> 42 <allow-intent href="itms-apps:*" /> 43 </platform> 44 <engine name="ios" spec="~3.9.2" /> 45 <engine name="android" spec="~4.1.1" /> 46</widget> 47
実行はlocalで実行しています。
媒体はiOSです。
あなたの回答
tips
プレビュー