Website Installation page http://phonegap.com/install/one-line installation
The code is as follows |
Copy Code |
$ sudo npm install-g phonegap |
It's a little bit of a trick, and by the experience of the previous configuration environment, I'm not too sure, install it, run
The code is as follows |
Copy Code |
$ phonegap |
Every programmer starts with "Hello World" and continues.
The code is as follows |
Copy Code |
$ phonegap Create Hello World |
According to the official website's instructions, the last step is
The code is as follows |
Copy Code |
$ phonegap Run iOS |
Unsurprisingly, I didn't succeed, and I reported a bunch of things missing iOS.
I checked the internet, there is a call Cordova specific what is the link, continue to install
The code is as follows |
Copy Code |
$ sudo npm install-g Cordova |
Run or error, the original NPM installed is not with the support files of each platform, download the compression package, unpack the inside is a bunch of zip, iOS, Android, Blackberry, Windows phone and so on ... I finally found it.
The code is as follows |
Copy Code |
$ Cordova Platform Add iOS $ Cordova Build iOS |
Coherent, double-click the hellocordova.xcodeproj can be opened in the Xcode, only the last step less iOS simulator,
All finished, the environment has been built (iOS is only configured here)