2017-01-19 2 views
0

Я использую кордовую плагин-whitelist (v 1.3.1) с моим приложением cordova. У меня есть правило в моем config.xmlКордонский плагин Белый список с телефоном Строка не работает на iOS

<allow-intent href="tel:*"/> 

У меня есть код в моем приложении, которое выглядит следующим образом:

window.open('tel:2065551212'); 

Если я строю на месте и развернуть в магазин приложений, код работает нормально как на Android, так и на ios.

Если я использую систему Adobe Phonegap Build, tel: ссылки работают ТОЛЬКО на андроиде и НЕ работают на ios.

Я пробовал несколько различных настройки без толка :(

я на прошивке 10.2, если это помогает. Но, я полагаю, другие версии прошивки будут затронуты аналогичным образом.

Я бы люблю помощь

Обратите внимание, мой полный файл config.xml ниже:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<widget id="com.xxx.yyy" version="5.0.6" android-versionCode="6" ios-CFBundleVersion="5.0.6.6" 
     xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
    <name>XXX</name> 
    <description>Description...</description> 
    <author email="[email protected]" href="http://www.example.org/">XXX Team</author> 
    <content src="index.html"/> 
    <access origin="*" launch-external="yes" /> 
    <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">  
    <icon src="resources/ios/icon/icon.png" width="57" height="57"/> 
    <icon src="resources/ios/icon/[email protected]" width="114" height="114"/> 
    <icon src="resources/ios/icon/icon-40.png" width="40" height="40"/> 
    <icon src="resources/ios/icon/[email protected]" width="80" height="80"/> 
    <icon src="resources/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="resources/ios/icon/icon-50.png" width="50" height="50"/> 
    <icon src="resources/ios/icon/[email protected]" width="100" height="100"/> 
    <icon src="resources/ios/icon/icon-60.png" width="60" height="60"/> 
    <icon src="resources/ios/icon/[email protected]" width="120" height="120"/> 
    <icon src="resources/ios/icon/[email protected]" width="180" height="180"/> 
    <icon src="resources/ios/icon/icon-72.png" width="72" height="72"/> 
    <icon src="resources/ios/icon/[email protected]" width="144" height="144"/> 
    <icon src="resources/ios/icon/icon-76.png" width="76" height="76"/> 
    <icon src="resources/ios/icon/[email protected]" width="152" height="152"/> 
    <icon src="resources/ios/icon/[email protected]" width="167" height="167"/> 
    <icon src="resources/ios/icon/icon-small.png" width="29" height="29"/> 
    <icon src="resources/ios/icon/[email protected]" width="58" height="58"/> 
    <icon src="resources/ios/icon/[email protected]" width="87" height="87"/> 
    <splash src="resources/ios/splash/[email protected]~iphone.png" width="640" height="1136"/> 
    <splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/> 
    <splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/> 
    <splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/> 
    <splash src="resources/ios/splash/[email protected]~ipad.png" width="2048" height="1536"/> 
    <splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/> 
    <splash src="resources/ios/splash/[email protected]~ipad.png" width="1536" height="2048"/> 
    <splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/> 
    <splash src="resources/ios/splash/[email protected]~iphone.png" width="640" height="960"/> 
    <splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/> 
    </platform> 
    <preference name="webviewbounce" value="false"/> 
    <preference name="UIWebViewBounce" value="false"/> 
    <preference name="DisallowOverscroll" value="true"/> 
    <preference name="android-minSdkVersion" value="19"/> 
    <preference name="BackupWebStorage" value="none"/> 
    <preference name="SplashScreenDelay" value="0"/> 
    <preference name="FadeSplashScreen" value="false"/> 
    <preference name="FadeSplashScreenDuration" value="0"/> 
    <preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/> 
    <feature name="StatusBar"> 
    <param name="ios-package" onload="true" value="CDVStatusBar"/> 
    </feature> 
    <plugin name="cordova-plugin-device" spec="~1.1.3"/> 
    <plugin name="cordova-plugin-console" spec="~1.0.4"/> 
    <plugin name="cordova-plugin-whitelist" spec="1.3.1"/> 
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/> 
    <plugin name="cordova-plugin-statusbar" spec="~2.2.0"/> 
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/> 
    <plugin name="cordova-plugin-google-analytics" spec="~1.5.6"/> 
    <plugin name="cordova-plugin-app-version" spec="~0.1.9" /> 
    <icon src="resources/ios/icon/[email protected]"/> 
</widget> 

ответ

0

я получил эту работу, добавив следующие предпочтения в мой файл config.xml:

<preference name="phonegap-version" value="cli-6.4.0" /> 

Это говорит, что Phonegap Build использует cli-6.4.0, а не его по умолчанию (это cli-6.3.0 от 19 января 2017 года).

Примечание. Формат файла конфигурации, который я использую, является правильным для обеих версий cli. Мне хотелось бы узнать, что происходит на самом деле.