Friday, 13 September 2013

Hybrid mobile application native packaging using PhoneGap 2.9 in iOS


In previous blogs, I have given an outline of hybrid application packaging in android. Today lets discuss native packaging in iOS using PhoneGap.


  1. MacBook with Mountain Lion or higher
  2. Xcode 4.5 or higher
  3. PhoneGap 2.9.0 downloaded and extracted

Create an iOS application project

PhoneGap provides command line tools to easily create an iOS application project. Open console/command prompt and navigate to the lib/ios/bin of the PhoneGap installation location and create a project as follows.

   ./create PathTONewProject PackageName AppName
    PathTONewProject : The path to where you wish to create the project
    PackageName      : The package for the project
    AppName          : The name of the application/activity

   ./create /opt/workspace/MyProject com.example.apps MyApp

The project will have a .xcodeproject at the root folder. You can open this project in a Xcode editor either by double click on that file or open it using open project menu in Xcode.

This is the structure of iOS application project.

Inside www folder, you can put your HTML, JavaScript, CSS code and start running the app.

Happy coding!

No comments:

Post a Comment