Phonegap Official Website: http://phonegap.com/
Part 1: Install nodejs
Installation address: http://nodejs.org/
Install phonegap official website download http://phonegap.com/install/
$ Sudo NPM install-G phonegap the installation may be slow and wait patiently
Installed successfully
Usr/local/bin/phonegap->/usr/local/lib/node_modules/phonegap/bin/phonegap. js
[Email protected]/usr/local/lib/node_modules/phonegap
├ ── [Email protected]
├ ── [Email protected]
├ ── [Email protected]
├ ── [Email protected]
├ ── [Email protected]
├ ── [Email protected] ([email protected], [email protected])
── [Email protected] ([email protected], [email protected], [email protected], [email protected])
── [Email protected] ([email protected], [email protected], [email protected], [email protected])
── [Email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
── [Email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
Part 2 modify local folder Permissions
Sudo chown-r $ user/usr/local
Sudo chmod-r 0775/usr/local
Part 3
NPM install-G CORDOVA
Part 4
CD/usr/local/lib/node_modules/phonegap/lib/phonegap
$ Phonegap create my-app
Installed successfully
[Phonegap] missing library phonegap/www/3.4.0
[Phonegap] downloading https://github.com/phonegap/phonegap-app-hello-world/archive/3.4.0.tar.gz...
[Phonegap] The options undefined/usr/local/lib/node_modules/phonegap/lib/phonegap/My-app com. phonegap. helloworld
[Phonegap] created Project at/usr/local/lib/node_modules/phonegap/lib/phonegap/My-app
Localhost: My-app LSR $ ls
Hooks merges platformspluginswww
The WWW directory stores HTML, JS, and CSS.
And a subdirectory of Res. The res directory stores icons and startup screens of multiple platforms.
The platforms directory is empty currently. When you create a project for multiple platforms, the corresponding project directory is added to the directory.
The plugins directory is empty currently, and will be downloaded to this directory when adding a plug-in.
Part 5
Phonegap run IOS
Created successfully
Detecting ios sdk environment...
[Phonegap] using the local environment
[Phonegap] adding the iOS platform...
[Phonegap] missing library Cordova/IOS/3.4.0
[Phonegap] downloading https://git-wip-us.apache.org/repos/asf? P = cordova-ios.git; A = snapshot; H = 3.4.0; Sf = tgz...
[Phonegap] compiling Ios...
Build settings from command line:
Archs = i386
Configuration_build_dir =/usr/local/lib/node_modules/phonegap/lib/phonegap/My-APP/platforms/IOS/build/emulator
Sdkroot = iphonesimulator7.0
Valid_archs = i386
=== Build target cordovalib of Project cordovalib with configuration debug ====
** Build succeeded **
[Phonegap] successfully compiled iOS app
[Phonegap] trying to install app onto Device
Error: IOS-deploy was not found. please download, build and Install Version 1.0.4 or greater from https://github.com/phonegap/ios-deploy into your path. or 'npm install-G iOS-deploy' using node. JS: http://nodejs.org/
[Phonegap] No device was found
[Phonegap] trying to install app onto emulator
[Warning] missing iOS-sim
[Warning] install iOS-sim from http://github.com/phonegap/ios-sim
Error: IOS-Sim was not found. please download, build and install version 1.7 or greater from https://github.com/phonegap/ios-sim into your path. or 'npm install-G iOS-sim 'using node. JS: http://nodejs.org/
[Error]/usr/local/lib/node_modules/phonegap/lib/phonegap/My-APP/platforms/IOS/Cordova/run: Command failed with exit code 1
Open the project in the platforms folder.
Configure the development environment in phonegap + xcode5.0.2