Labels

Learn the powerful enterprise adaptable database:

Getting Started With ADABAS & Natural

Tuesday, March 12, 2013

PhoneGap@Mac: Creating PhoneGap Project

This tutorial guides the reader to create PhoneGap (Version 2.5) Project for XCode (Version 4.6). This is a simplified version of http://cordova.apache.org/docs/en/2.5.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS

1) Go to phonegap.com and download the PhoneGap pack.


2) Unzip the package. Locate the bin folder for ios,
e.g.  ./users/notarazi/downloads/phonegap-2.5.0/lib/ios/bin/create


3) Run Terminal to execute Console Command.
3.1.) Using Finder, go to Applications/Terminal.
3.2) When Terminal Window opens, type the following command

cd /

 ./users/notarazi/downloads/phonegap-2.5.0/lib/ios/bin/create

3.3) If the path is correct, you should get the following output. The output shows the create command and its required parameter.



3.4) Run the create command along with the correct parameter,
e.g.  ./users/notarazi/downloads/phonegap-2.5.0/lib/ios/bin/create <space> /users/notarazi/documents/xcodeprojects/prjphonegap1/ <space> com.notarazi.prjphonegap1 <space> prjphonegap1

3.5) A project folder will be created and can be opened via Xcode program.


4) Run Xcode. Open prjphonegap.xcodeproj.


5) Run.



7 comments:

  1. Hi, I always get the same error message in the terminal:

    "/users/office/downloads/phonegap-2.5.0/lib/ios/bin/replaces: line 28: tmpFile: Permission denied
    mv: tmpFile: No such file or directory"

    can you help me?

    Thanks,
    Dominik

    ReplyDelete
  2. I use the zip file downloaded from https://downloads.sourceforge.net/project/phonegap/phonegap-2.5.0.zip but didn't encounter problem like yours.

    I have zipped my project file and uploaded it here, http://sites.google.com/site/notaphonegap/home/beginner/prjphonegap.zip .

    Try download, unzip and open the project file using Xcode. May be we can learn something from here.

    ReplyDelete
    Replies
    1. Hi,

      thanks very much. Your installation worked well!

      I don't know what was my mistake.

      Dominik

      Delete
  3. Dominik,

    Try run it with "sudo"

    For example - #sudo ./users/office/downloads/phonegap-2.5.0/lib/ios/bin/replaces and put in your password when prompted.

    It should work.

    Thanks.

    ReplyDelete
  4. Hi, Razi, i was wondering, can i use the phonegap in xcode with and using the php and mysql?

    ReplyDelete
  5. You can read about that here, http://samcroft.co.uk/2012/posting-data-from-a-phonegap-app-to-a-server-using-jquery/

    ReplyDelete