Install Phonegap Environment setup:
First i will tell you how to install Phonegap in mac System.
Step : 1
(a).Install x-code lastest version.
(b).Install Node.js.
To Install, ensure that you have NodeJS installed, then open your commandline and run the following:
(c).Install Cordova (or) Phonegap
Apples-MacBook-Pro:~ apple$ npm install -g cordova (or) Apples-MacBook-Pro:~ apple$ npm install -g phonegap
Once installation completes, just check the Path in command line using this command.
Apples-MacBook-Pro:~ apple$ cordova -version 3.5.0-0.2.7
(d).Install Apache-Ant. Run brew update & then install ant brew install ant
Step 2: For iOS development, Run to the App Store & Download the latest version of XCode. After the installation is completed, launch the application & accept the license, terms.
Step 3: For Android development, Navigate here & download the ADT bundle for MAC. After the download is completed, unzip the file. Navigate inside the eclipse folder and run Eclipse.app. Once eclipse loads up, You will see a menu bar on the top left hand corner
Click on the 3rd icon from right (in the above image). This will launch the Android SDK Manager. You can select the targeted Android version from the list.
Step 4: Configure Android SDK. We need to hook up the SDK path.
In your terminal, Run cd ~ Remember where you have downloaded the ADT Eclipse? We need to head back to the unzipped folder & then into SDK & then into tools folder. Right click & click Get Info.. You should see a path.
On my mac, this is how it will look
export PATH=/Users/me/Development/adt-bundle-mac-x86_64-20130917/sdk/tools:Users/me/Development/adt-bundle-mac-x86_64-20130917/sdk/platform-tools:$PATH
Next, lets edit the .bash_profile & add the SDK instance open -e .bash_profile & add the above line to the top of the file. Save and close .bash_profile
If you want to use the same code and functionality in android and ios application u can create local developer project.
If you want to develop android and ios app support Mac OS
just create a phonegap project in terminal.
Add Platforms:
$ cd hello $ cordova platform add ios $ cordova platform add android
next build the platforms using this command:
$ cordova build ios. $ cordova build android.
Open your project folder hello/platforms/ios
double click ios "HelloWorld.xcodeproj".
this project file will open in x-code.
and develop your project pages in www folder.
No comments:
Post a Comment