shenku shenku -5 years ago 162
AngularJS Question

Why is my Ionic2 app always serving as Android app?

I am using ionic2 to develop and ios app - I typically test this locally using

ionic serve
, after an
ionic build ios

At one stage I wanted to demostrate the android capability, and built/served it in the same way for android.

Ever since i am unable to serve the ios version?

What gives, is there some config that has changed that I should delete or similar?

Here is my current config:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget id="com.ionicframework.myionic2463102" version="0.0.1" xmlns="" xmlns:cdv="">
<description>An Ionic Framework and Cordova project.</description>
<author email="hi@ionicframework" href="">Ionic Framework Team</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:*"/>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<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="SplashScreenDelay" value="2000"/>
<preference name="FadeSplashScreenDuration" value="2000"/>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>

Answer Source

You can force the platform in ionic serve with the --platform option, in your case ionic serve --platform ios

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download