Build PHONEGAP Environment under MAC environment

Source: Internet
Author: User

First, in the official documentation, it is required to compile Mac devices that require an Intel-architected Mac OS X system, with a minimum of XCode4.5 and above and Mac OS X 10.7 and above, and IOS6.0 more than the SDK, as for publishing, it depends on the latest requirements of the Apple Store.
There are more restrictions, such as the version requirements required by Cordova, and you can look at PhoneGap's detailed official documentation as follows:
Http://docs.phonegap.com/en/edge/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide

First step, download, Xcode and PhoneGap
Xcode is downloaded from the developer.apple.com Apple Developer Center and requires a developer account
PhoneGap can be downloaded in the http://phonegap.com/install/, choose the version of their own
I download this 2.9.1 to the latest version of the current

Part two, creating an iOS project from PhoneGap
Download the zip archive in the previous step, unzip it, and then see the directory structure inside
Doc, of course, is the API documentation.
Lib is the PhoneGap library, which we can easily understand, is a library of different platforms, we want to create an iOS platform, now, we want to go through the terminal terminal into the Bin folder, that is, the PhoneGap folder under the lib/ios/ The bin directory.

Creating a project from Create
The command structure for Create is as follows
Usage:./create [--shared] [--arc] <path_to_new_project> <package_name> <project_name>
We create a helloworld that can be as follows
./create/volumes/data/dworks/phonegap/helloworld com.liyunpeng.www HelloWorld
This means that, under the Dworks/phonegap/helloworld directory I specified, create a package fame com.liyunpeng.www with a project named HelloWorld

Part III, build framework Cordova
Cordova is a library that provides programs that directly invoke the device's Hardware API
Go to the HelloWorld project folder, you can see Cordova, and then open the Terminal command in this folder, using the./build command, the interface will prompt build successed after successful operation.

Fourth, through Xcode open the project file Helloworld.xcodeproj, and then run directly, if you see the running interface below, it represents success.



We look back at the project in Xcode, we'll find a www folder, something like a Web project or a Nodejs project, and our HTML and CSS,JS are all in this folder.

Build PHONEGAP Environment under MAC environment

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.