Problems with Getting Started with Ionic OSX

I have a problem when it comes starting with ionic in Mac. I'll explain the steps I have taken and errors I found, to see if anyone can help me.

I installed node.js from this site: nodejs.org

Thereupon I executed these commands:

  1. $ sudo npm install -g cordova ionic cordova
  2. $ ionic start myApp tabs
  3. $ ionic serve

And with this last order I can see the application running. but if I try to do this:

$ sudo ionic platform add ios

I get this error:

enter image description here

But, These are the versions of the programs I use:

  • cordova - 3.6.3-0.2.13
  • Ionic - 1.2.7 Xcode - 6.0.1 (6A317)
  • XAMPP - 1.8.3-3

Someone could help me solve my problem?

Thank you in advance.

The error message says the problem, "Cordova can only run in Xcode version 4.6 or greater."

You need to install Xcode and the Xcode command line tools. Download Xcode from the AppStore, and run this command in the terminal to get the command line tools.

xcode-select --install

Also do not use sudo with the ionic commands. You'll possibly cause permission issues down the road.