Thursday, August 8, 2013

Phonegap and Xcode installation

I tried my first shot at Phonegap today. I installed Phonegap command line utilities, using node.js npm modules and stuff.

And then I downloaded the latest Xcode from Apple. And as per instruction in here (in the Install the SDK section), I also installed the Xcode command line tools.

Then I tried:

$ phonegap create hello com.example.helloapp HelloApp
$ cd hello
$ phonegap platform add ios
[Error: Xcode is (probably) not installed, specifically the command `xcodebuild` is unavailable or erroring out. Output of `xcodebuild -version` is: Error: Can't run /Applications/ (no such file).

After much googling, I found this on StackOverflow:

$ sudo xcode-select -switch /Applications/

And it solved the problem.