Ionic2 IOS failed while android OK - ios

I'm building an application with Ionic2 cordova.
I don't understand why the application is running fine on Chrome (ionic serve) and android (ionic run android) while it's not on safari (ionic serve) and xcode emulator (ionic run ios).
The application launches the splashscreen on xcode emulator then stays blank.
Here is my ionic info:
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.2.2
Xcode version: Xcode 7.3 Build version 7D175
I opened the project on xcode, and here is the errors I get:
2016-08-21 17:59:30.175 Woocommerce Mobile[70183:8564273] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/GM/Library/Developer/CoreSimulator/Devices/3DEADFD6-D4D5-437C-9DBA-2FC8D02DA537/data/Containers/Data/Application/C7FE4875-2781-4FC8-9B68-AA6E1F8BCA7D/Library/Cookies/com.yin.woocommerce.binarycookies
2016-08-21 17:59:30.221 Woocommerce Mobile[70183:8564273] Apache Cordova native platform version 4.1.1 is starting.
2016-08-21 17:59:30.222 Woocommerce Mobile[70183:8564273] Multi-tasking -> Device: YES, App: YES
2016-08-21 17:59:30.273 Woocommerce Mobile[70183:8564273] CDVWKWebViewEngine: trying to inject XHR polyfill
2016-08-21 17:59:30.277 Woocommerce Mobile[70183:8564273] CDVWKWebViewEngine will reload WKWebView if required on resume
2016-08-21 17:59:30.277 Woocommerce Mobile[70183:8564273] Using WKWebView
2016-08-21 17:59:30.278 Woocommerce Mobile[70183:8564273] [CDVTimer][handleopenurl] 0.079989ms
2016-08-21 17:59:30.280 Woocommerce Mobile[70183:8564273] [CDVTimer][intentandnavigationfilter] 1.766980ms
2016-08-21 17:59:30.280 Woocommerce Mobile[70183:8564273] [CDVTimer][gesturehandler] 0.063002ms
2016-08-21 17:59:30.280 Woocommerce Mobile[70183:8564273] CDVPlugin class CDVSplashScreen (pluginName: splashscreen) does not exist.
2016-08-21 17:59:30.280 Woocommerce Mobile[70183:8564273] [CDVTimer][splashscreen] 0.165999ms
2016-08-21 17:59:30.280 Woocommerce Mobile[70183:8564273] CDVPlugin class IonicKeyboard (pluginName: keyboard) does not exist.
2016-08-21 17:59:30.280 Woocommerce Mobile[70183:8564273] [CDVTimer][keyboard] 0.117004ms
2016-08-21 17:59:30.281 Woocommerce Mobile[70183:8564273] CDVPlugin class CDVStatusBar (pluginName: statusbar) does not exist.
2016-08-21 17:59:30.296 Woocommerce Mobile[70183:8564273] [CDVTimer][statusbar] 15.504956ms
2016-08-21 17:59:30.296 Woocommerce Mobile[70183:8564273] [CDVTimer][TotalPluginStartup] 18.702984ms
2016-08-21 17:59:30.719 Woocommerce Mobile[70183:8564273] CDVPlugin class CDVDevice (pluginName: Device) does not exist.
2016-08-21 17:59:30.720 Woocommerce Mobile[70183:8564273] ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2016-08-21 17:59:30.720 Woocommerce Mobile[70183:8564273] FAILED pluginJSON = ["Device1663822631","Device","getDeviceInfo",[]]
2016-08-21 17:59:30.721 Woocommerce Mobile[70183:8564273] CDVPlugin class CDVStatusBar (pluginName: StatusBar) does not exist.
2016-08-21 17:59:30.721 Woocommerce Mobile[70183:8564273] ERROR: Plugin 'StatusBar' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2016-08-21 17:59:30.721 Woocommerce Mobile[70183:8564273] FAILED pluginJSON = ["StatusBar1663822632","StatusBar","_ready",[]]
2016-08-21 17:59:30.958 Woocommerce Mobile[70183:8564598] CDVWKWebViewEngine: XHR intercepted: build/app.html
And finally my config.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Woocommerce Mobile</name>
<description>Woocommerce Mobile Application</description>
<author email="" href="http://ionicframework.com/">Mobile Division</author>
<content src="index.html"/>
<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:*"/>
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png"/>
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png"/>
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png"/>
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png"/>
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png"/>
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png"/>
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png"/>
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png"/>
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png"/>
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png"/>
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png"/>
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png"/>
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png"/>
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png"/>
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png"/>
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png"/>
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<icon height="57" src="resources/ios/icon/icon.png" width="57"/>
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114"/>
<icon height="40" src="resources/ios/icon/icon-40.png" width="40"/>
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80"/>
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120"/>
<icon height="50" src="resources/ios/icon/icon-50.png" width="50"/>
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100"/>
<icon height="60" src="resources/ios/icon/icon-60.png" width="60"/>
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120"/>
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180"/>
<icon height="72" src="resources/ios/icon/icon-72.png" width="72"/>
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144"/>
<icon height="76" src="resources/ios/icon/icon-76.png" width="76"/>
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152"/>
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167"/>
<icon height="29" src="resources/ios/icon/icon-small.png" width="29"/>
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58"/>
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87"/>
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640"/>
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750"/>
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242"/>
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208"/>
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048"/>
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024"/>
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536"/>
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768"/>
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640"/>
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320"/>
</platform>
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine"/>
</feature>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="16"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="2000"/>
<preference name="FadeSplashScreenDuration" value="2000"/>
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
<plugin name="cordova-plugin-device" spec="~1.1.2"/>
<plugin name="cordova-plugin-console" spec="~1.0.3"/>
<plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
<plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
<plugin name="ionic-plugin-keyboard" spec="~2.2.0"/>
<plugin name="cordova-plugin-statusbar" spec="~2.1.3"/>
<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git"/>
</widget>
Any idea why this is working fine on android and not on ios? Sorry for my noobness, this is all new for me...
Thanks.

Related

PhoneGap App stopped loading to Apple Test Flight with Icon Missing Error. Worked OK until a month or two ago

Our latest build of a PhoneGap application for iOS and Android, was built OK on the ADOBE PhoneGap build site.
When we attempt to load it from an Apple MAC onto the Apple Test Flight system, we get this error:
"Missing App Icon..."
1
This relates to the App Store Icon 1024x1024
We are now on version 24 of the App - so 23 previous versions built and loaded OK.
We have set up all the necessary Apple IDs etc. (and all has been working fine) although in the past we used to get a WARNING about the missing Icon, now the Load just stops.
We have contacted Apple Support who suggested rebuilding and trying again. Not made any difference...
I have found a number of articles that suggest we needed to update our CONFIG.XML file, with details of the icon with size 1024x1024, and also to use PhoneGap CLI 7.1.0. No success.
here is the CONFIG file (or at least the relevant bits)
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.cognect.mobile" version="1.0.24" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<content src="index.html" />
<preference name="DisallowOverscroll" value="true" />
<preference name="phone-gap-version" value="cli-7.1.0" />
<preference name="android-minSdkVersion" value="17" />
<plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" />
<and a whole load more plugins...>
<platform name="ios">
<icon platform="ios" src="www/res/icon/ios/icon.png" width="1024" height="1024" />
<icon height="114" platform="ios" src="www/res/icon/ios/icon#2x.png" width="114" />
<icon height="40" platform="ios" src="www/res/icon/ios/icon-40.png" width="40" />
<and a whole load more icons....>
<splash height="1136" platform="ios" src="www/res/screen/ios/Default-568h#2x~iphone.png" width="640" />
<splash height="768" platform="ios" src="www/res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" platform="ios" src="www/res/screen/ios/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="1024" platform="ios" src="www/res/screen/ios/Default-Portrait~ipad.png" width="768" />
</platform>

Error: Invalid resource directory name for splash

I have a Nuxt JS / Cordova 8.0.0 project with a few plugins. I'm trying to add custom splash screens to the project, and have added them inside of res/screen/android/
Every time I try to compile the project, I get the following error when building for Android:
`Execution failed for task ':app:mergeDebugResources'.
/Applications/MAMP/htdocs/project-beacon/cordova/platforms/android/app/src/main/res/drawable-xhdpi-portrait: Error: Invalid resource directory name`
This is really frustrating.
I have my config.xml file setup as follows:
<platform name="android">
<preference name="SplashMaintainAspectRatio" value="true" />
<icon density="ldpi" height="36" src="res/icon/android/icon-36-ldpi.png" width="36" />
<icon density="mdpi" height="48" src="res/icon/android/icon-48-mdpi.png" width="48" />
<icon density="hdpi" height="72" src="res/icon/android/icon-72-hdpi.png" width="72" />
<icon density="xhdpi" height="96" src="res/icon/android/icon-96-xhdpi.png" width="96" />
<splash density="port-xhdpi" src="res/screen/android/screen-xhdpi-portrait.png" />
<splash src="res/splash/android/Default#2x~universal~anyany.png" />
<allow-intent href="market:*" />
<custom-config-file parent="/*" target="AndroidManifest.xml">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
</custom-config-file>
</platform>
Originally, I had a load of splash screens, but due to the error, I've removed them to see if it would fix it. I have tried changing the file names and everything.
You have 2 <platform name="android">
Also you have <splash src="res/splash/android/Default#2x~universal~anyany.png" /> which has no density, remove it.

Ionic can't find platform

What is wrong with my config files (OR ionic cordova setup); it can't find any platforms but I do have ios installed already, PLUS ionic tries to add and fails because it exists... The example below is from emulate, the same errors are generated by $ionic cordova platform add ios as well.
$ ionic cordova emulate ios
> cordova platform add ios --save
✖ Running command - failed!
[WARN] Platform already added. Saving platforms to config.xml.
> cordova platform save
✔ Running command - done!
[INFO] Running app-scripts build: --platform ios --target cordova
[22:44:34] build dev started ...
[22:44:34] clean started ...
[22:44:34] clean finished in 11 ms
[22:44:34] copy started ...
[22:44:34] transpile started ...
[22:44:38] transpile finished in 4.45 s
[22:44:38] preprocess started ...
[22:44:38] deeplinks started ...
[22:44:39] deeplinks finished in 264 ms
[22:44:39] preprocess finished in 265 ms
[22:44:39] webpack started ...
[22:44:39] copy finished in 4.89 s
[22:44:50] webpack finished in 11.63 s
[22:44:50] sass started ...
[22:44:51] sass finished in 1.04 s
[22:44:51] postprocess started ...
[22:44:51] removed unused font files
[22:44:51] postprocess finished in 10 ms
[22:44:51] lint started ...
[22:44:51] build dev finished in 17.47 s
> ionic cordova prepare
[WARN] No Cordova platforms listed in config.xml. Nothing to prepare.
You can save your installed platforms to config.xml with the ionic cordova platform save command.
[22:44:53] lint finished in 2.11 s
And this is my config.xml file:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.nkt.pms" version="2.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Sys</name>
<description>System</description>
<author email="support#XXXX.net" href="http://XXXX">The XXXX Team</author>
<content src="index.html" />
<access origin="*" />
<allow-navigation href="http://ionic.local/*" />
<allow-navigation href="http://XXXX:8100" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<preference name="AndroidLaunchMode" value="singleTask" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="orientation" value="portrait" />
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon#2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40#2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40#3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50#2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60#2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60#3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72#2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76#2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5#2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small#2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small#3x.png" width="87" />
<splash height="1136" src="resources/ios/splash/Default-568h#2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape#2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape#~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait#~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default#2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
</platform>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<icon src="resources/newicon.png" />
<icon src="resources/android/icon/drawable-xhdpi-icon.png" />
<plugin name="cordova-plugin-camera" spec="~2.4.1">
<variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " />
</plugin>
<plugin name="cordova-plugin-console" spec="^1.1.0" />
<plugin name="cordova-plugin-customurlscheme" spec="^4.3.0">
<variable name="URL_SCHEME" value="com.nkt.pms" />
<variable name="ANDROID_SCHEME" value="com.nkt.pms" />
<variable name="ANDROID_HOST" value="pmsys.eu.auth0.com" />
<variable name="ANDROID_PATHPREFIX" value="/cordova/com.nkt.pms/callback" />
</plugin>
<plugin name="cordova-plugin-device" spec="^1.1.6" />
<plugin name="cordova-plugin-file" spec="~4.3.3" />
<plugin name="cordova-plugin-file-transfer" spec="~1.6.3" />
<plugin name="cordova-plugin-filepath" spec="~1.0.2" />
<plugin name="cordova-plugin-safariviewcontroller" spec="^1.4.7" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
<plugin name="cordova-sqlite-storage" spec="^2.0.4" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
$ ionic info
cli packages: (/Users/larsbrenna/Desktop/dev/app/node_modules)
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.4
Cordova Platforms : ios
Ionic Framework : ionic-angular 3.7.1
System:
Node : v6.9.1
npm : 5.4.2
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235
Any and all tips and hints appreciated!!
Ionic can't find the platform because the <engine> tag is missing in config.xml. Try cleaning up your setup a bit:
Run cordova platform rm ios (you may get an error that the platform is not added)
Remove the platforms folder if it still exists
Maybe also remove the plugins folder if you want them reinstalled
Remove all references related to the ios platform in package.json
Delete node_modules and package-lock.json
Then make sure cordova and ionic CLIs are up to date:
(sudo) npm install -g cordova#latest ionic#latest
Then restore everything step by step:
npm install
cordova platform add ios#4.5.1
I personally like to run the cordova commands just through the cordova CLI not via the ionic CLI (when running ionic cordova ... the ionic CLI just forwards cordova related commands to the cordova CLI, which can lead to errors). Just for building and running the app I use the combined commands because its more convenient.
I also noticed that you are using an old version of #ionic/app-scripts with the newest ionic-angular version. You should upgrade this too.

Cordova Plugin Whitelist with Phonegap Build doesn't work on iOS

I'm using the cordova-plugin-whitelist (v 1.3.1) with my cordova app.
I have a rule in my config.xml
<allow-intent href="tel:*"/>
I have code in my app that looks like this:
window.open('tel:2065551212');
If I build locally and deploy to the app store, the code works fine on both android and ios.
If I build using Adobe's Phonegap Build system, tel: links work ONLY on android and do NOT work on ios.
I've tried a number of different settings to no avail :(
I am on iOS 10.2 if that helps. But, I believe other versions of iOS are similarly affected.
I'd love some help!
Note, my full config.xml file is below:
<?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="info#xxx.com" 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/icon#2x.png" width="114" height="114"/>
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
<icon src="resources/ios/icon/icon-40#2x.png" width="80" height="80"/>
<icon src="resources/ios/icon/icon-40#3x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
<icon src="resources/ios/icon/icon-50#2x.png" width="100" height="100"/>
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
<icon src="resources/ios/icon/icon-60#2x.png" width="120" height="120"/>
<icon src="resources/ios/icon/icon-60#3x.png" width="180" height="180"/>
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
<icon src="resources/ios/icon/icon-72#2x.png" width="144" height="144"/>
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
<icon src="resources/ios/icon/icon-76#2x.png" width="152" height="152"/>
<icon src="resources/ios/icon/icon-83.5#2x.png" width="167" height="167"/>
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
<icon src="resources/ios/icon/icon-small#2x.png" width="58" height="58"/>
<icon src="resources/ios/icon/icon-small#3x.png" width="87" height="87"/>
<splash src="resources/ios/splash/Default-568h#2x~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/Default-Landscape#2x~ipad.png" width="2048" height="1536"/>
<splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="resources/ios/splash/Default-Portrait#2x~ipad.png" width="1536" height="2048"/>
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="resources/ios/splash/Default#2x~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/icon-small#3x.png"/>
</widget>
I got this working by adding the following preference to my config.xml file:
<preference name="phonegap-version" value="cli-6.4.0" />
This tells Phonegap Build to use cli-6.4.0 rather than its default (which is cli-6.3.0 as of January 19, 2017).
Note: The config file format I use appears to be correct for both versions of the cli. I would love insight into what is actually going on.

<access origin="http://*" launch-external="yes" /> not working for iOS

launch-external does not seems to work for iOS. but it works perfectly for android.
I am looking for a 'launch-external' equivalent for iOS, i am using cardova (version 3.7.0) and phoneGap online build tool.
below is my config.xml
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.something.something" version="1.0.3">
<name>something</name>
<description>
something
</description>
<author href="http://something.com" email="something#something.com">Something</author>
<content src="index.html"/>
<preference name="permissions" value="none"/>
<preference name="orientation" value="default"/>
<preference name="target-device" value="universal"/>
<preference name="fullscreen" value="false"/>
<preference name="webviewbounce" value="false"/>
<preference name="prerendered-icon" value="true"/>
<preference name="stay-in-webview" value="false"/>
<preference name="ios-statusbarstyle" value="black-opaque"/>
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="true"/>
<preference name="show-splash-screen-spinner" value="true"/>
<preference name="auto-hide-splash-screen" value="true"/>
<preference name="disable-cursor" value="false"/>
<preference name="android-minSdkVersion" value="7"/>
<preference name="android-installLocation" value="auto"/>
<preference name="DisallowOverscroll" value="true" />
<gap:plugin name="org.apache.cordova.console"/>
<gap:plugin name="org.apache.cordova.device"/>
<gap:plugin name="org.apache.cordova.dialogs"/>
<gap:plugin name="org.apache.cordova.geolocation"/>
<gap:plugin name="org.apache.cordova.globalization"/>
<gap:plugin name="org.apache.cordova.inappbrowser"/>
<gap:plugin name="org.apache.cordova.network-information"/>
<gap:plugin name="org.apache.cordova.vibration"/>
<gap:plugin name="org.apache.cordova.statusbar"/>
<gap:plugin name="org.apache.cordova.splashscreen"/>
<icon src="icon.png"/>
<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi"/>
<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi"/>
<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi"/>
<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi"/>
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57"/>
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72"/>
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114"/>
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144"/>
<!-- iPhone 6 / 6+ -->
<icon src="res/icon/ios/icon-60#3x.png" gap:platform="ios" width="180" height="180" />
<!-- iPhone / iPod Touch -->
<icon src="res/icon/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
<icon src="res/icon/ios/icon-60#2x.png" gap:platform="ios" width="120" height="120" />
<!-- iPad -->
<icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
<icon src="res/icon/ios/icon-76#2x.png" gap:platform="ios" width="152" height="152" />
<!-- Settings Icon -->
<!--
<icon src="res/icon/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
<icon src="res/icon/ios/icon-small#2x.png" gap:platform="ios" width="58" height="58" />
-->
<!-- Spotlight Icon -->
<!--
<icon src="res/icon/ios/icon-40.png" gap:platform="ios" width="40" height="40" />
<icon src="res/icon/ios/icon-40#2x.png" gap:platform="ios" width="80" height="80" />
-->
<platform name="ios">
<!-- images are determined by width and height. The following are supported -->
<splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
<splash src="res/screen/ios/Default#2x~iphone.png" width="640" height="960"/>
<splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="res/screen/ios/Default-568h#2x~iphone.png" width="640" height="1136"/>
</platform>
<access origin="sms:*" launch-external="yes" />
<access origin="geo:*" launch-external="yes" />
<access origin="mailto:*" launch-external="yes" />
<access origin="tel:*" launch-external="yes" />
<access origin="http://*" launch-external="yes" />
<plugin name="cordova-plugin-whitelist"/>
<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>
I am using location.href in index.html to open the url in separte browser. This is working in Android as expected but not in iOS
In the documentation, launch-external is only mentioned in the Android section. That's probably why it doesn't work for iOS.
As an alternative, you could use the InAppBrowser plugin (don't be fooled by its name) to open certain links externally, but this requires you to rewrite those links to window.open calls, with the target parameter set to _system.
I tried all of these suggestions in a recent iOS build and the only thing that worked for me was the InAppBrowser plugin and changing the code to window.open(href,"_system");

Resources