Step 1 Installing XCode on the system
- Download and install
XCodefrom the App Center alongwith theDeveloper Tools
Step 2 Download the Phonegap SDK
- Download and unzip the Phonegap SDK.
- Now navigate to the
iOS directoryin the extracted source and run theCordova-1.7.0.dmgand install it.
Step 3 Creating a XCode Project
Run
XCode and create a new Project
Select the template
Cordova-based Application
This will create the a new project and include the neccesary Phonegap API Files.
Step 4 Changing the default compiler
- Click on the application name and select
BUILD SETTINGStab in the center pane - Change the compiler in the
BUILD OPTIONSfromAPPLE LLVM COMPILERtoLLVM GCC
Step 5 Build and Run the Project
- Click on the left top of the XCode window selecting the default device as iPad/iPhone Now run the Project. This would invoke the simulator and run the application on it.
- Once the application runs a error will Popup stating the
index.htmlis not found. Close the simulator and return back to the XCode project window.
Step 6 Include www folder in the project to start with application development
- Right click the project name and select
Show in Finder - Drag the
wwwfolder from theFinderto theProject - A window pop's up , select to create references to the files.
Step 7 Again BUILD & RUN
- Now again build and run the project in an iPad/iPhone simulatore
- This time it would show up the
index.htmlwhich is located in thewwwfolder. Also it would show up theDialogstating that Phonegap was successfully integrated in the application
Step 8 Download JQuery Mobile bundle
Download the latest build of JQuery Mobile from http://jquerymobile.com/
Unzip the contents and add the files in the
www folder categorizing the folders as javascriptsstylesheets- `images'
Step 9 Including the JQuery mobile in the application
- Open
index.htmland create references to the javascript and css files located in thewwwfolder using the html tags
Step 10
Add a few lines of HTML to the index page and use the JQuery classes
and the Phonegap api function calls to implement the features of the
native application as desired
More Documentation available at
- JQuery Mobile http://jquerymobile.com/demos/1.1.0/
- Phonegap http://docs.phonegap.com/en/1.8.0/index.html
Step 11 * not tested though
- Once the application is complete or for on Device testing a
Apple's Developer Licenseis required to sign the applications. - After signing it , push the application to
PhoneGap Buildhttps://build.phonegap.com/. - Download the build package and deploy to th Device.
No comments:
Post a Comment
Any inputs are welcomed : ashish.cse2010@gmail.com