Configure the phonegap 3.x development environment for Mac

Source: Internet
Author: User

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-appThe directory containsmerges/ platforms/ plugins/ www/Sub-directories.

wwwThe directory stores HTML, JS, and CSS, andresSubdirectory. WhereresDirectory stores icons and startup screens of multiple platforms.

platformsThe directory is empty currently. When you create a project for multiple platforms, the corresponding project directory is added to the directory.

pluginsThe 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.