? You cannot run iOS unless you are on Mac OSX


I am trying to create an Android Cordova app using Ionic on a Windows machine. I have no intention of doing a iOS app at the moment.

So after doing the required:

ionic start myApp tabs
cd myApp
ionic platform add android

Since I have only added the Android platform, I thought I can simply do a build.

ionic build

And then Ionic complains:

? You cannot run iOS unless you are on Mac OSX.

Huh? What has my project got to do with iOS or Mac OSX when I have not added iOS as a platform for the project?

I have to do a:

ionic build android

This works. By default, if there is only 1 platform (i.e. android) or 1 installed emulator only, shouldn’t it be the implied default for ionic build, ionic run and ionic emulate?


Leave it, its just a warning. but you have to specify
ionic build , platform={ios,andriod}
in your case it is, ionic build android


You are obviously using an old version of Ionic CLI. Post your ionic info please to confirm.

Your system information:

 ordova CLI: 6.5.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.10.2
Xcode version: Not installed

I ran ionic lib

This command has been deprecated.  All resources are currently available in NPM
and we recommend that you use NPM to manage these.
More information is available here: https://github.com/driftyco/ionic-cli/wiki/M

Local Ionic version: 1.3.3  (<my-project-path->\version.
Invalid version: undefined


If I update to the latest Ionic, which by now defaults to supporting Ionic 2 Angular 2 projects, will it mess up my current Ionic 1 AngularJS projects?

I guess it would be something like

npm update -g ionic


Ionic CLI (what you install via npm install -g ionic) is something different than Ionic Framework. Ionic CLI v3 works with all versions of Ionic, only some commands changed. But everything is much faster and more stable.


How does one upgrade the Ionic Framework from 1 to 2 then? Not through the npm update command? I do not want to mess up my current Ionic 1 projects.

Btw, is there a listing of the changes from ionic cli in term of the switches and parameters?


By completely rewriting the app. Those are completely incompatible.