Recently, the company sorted out some documents for the phonegap project.
Versions earlier than phonegap 3.0 can be downloaded on the official website. Versions later than PHP 3.0 need to be installed using nodejs. It takes two hours to avoid detours.
At present, phonegap has released version 3.5, which integrates various plug-ins. If you want to try it out, try it as soon as possible.
The local system is OS X 10.9.2 xcode 5.1.
1. Install nodejs
Download the PKG installation package from the nodejs website and double-click it.
Ii. Install phonegap
This step is relatively easy to install with NPM
$ sudo npm install -g phonegap
3. Create a phonegap Project
$ phonegap create my-app --name myApp --id com.example.myApp$ cd my-app
We can see thatmy-app
The directory containsmerges/ platforms/ plugins/ www/
Sub-directories.
www
The directory stores HTML, JS, and CSS, andres
Subdirectory. Whereres
Directory stores icons and startup screens of multiple platforms.
platforms
The directory is empty currently. When you create a project for multiple platforms, the corresponding project directory is added to the directory.
plugins
The directory is empty at present, and will be downloaded to this directory when the plug-in is added.
4. Create a project for iOS
$ phonegap build ios
5. Use xcode to compile and create the installation package
Enterplatforms/ios/
, Use xcode to open MyApp. xcodeproj for compilation and Installation
Configure the phonegap 3.x development environment for Mac