Install SDK + PhoneGap for AppleIOS device

Posted: March 13, 2012 in Android Posts
Tags: , , , , , , , , , , , , ,
iOS SDK included in Xcode 3.1

Image via Wikipedia

  • 1. Requirements for AppleIOS device

    Necessary for Installing on Device:

  • 2. Install SDK + PhoneGap

    Download and install Xcode from Apple Developer Portal (Membership required)

    Download the latest copy of PhoneGap and extract its contents. Navigate to the iOS directory and run the installer until completion.

  • 3. Setup New Project

    • Launch Xcode, then under the File menu select New and then New Project…
    • Select PhoneGap-based Application from the list of templates

    • Select the Next button, Fill in the “Product Name” & “Company Identifier” for your app

    • Choose a directory to store your app
    • You should see your project in Xcode 4 now. Press the Run button in the top left corner. Your build should succeed and launch in the simulator
    • You should see a error in your simulator informing you index.html was not found
    • To fix this, we need to copy the www directory into the project. Right click on the project in the left navigation window and click show in finder
    • In Finder, you should see the www directory beside your project
    • Next step is IMPORTANT! Drag the www folder into Xcode 4. You can’t just drag the www folder into your app’s folder. It needs to be dragged into Xcode 4!! In my case I would drag it and drop it on HiWorld shown below.

  • After you drag, you should see a prompt with a few options. Make sure to select Create folder references for any added folders. Click Finish
  • 4. Hello World

    Open the folder named www and type <h1>Hello World</h1> after the <body> tag in index.html. You can also add any associated Javascript and CSS files there as well.

  • 5A. Deploy to Simulator

    • Make sure to change the Active SDK in the top left menu to Simulator+version#.
    • Hit Run in your project window header.
  • 5B. Deploy to Device

    • Open [AppName]-Info.plist and change BundleIdentifier to the identifier provided by Apple. If you have a developer license, you can access and run the Assistant at here and register your App.
    • Make sure to change the Active SDK in the top left menu to Device+version#.
    • Hit Run in your project window header.

  • Done!

    You can also checkout more detailed version of this guide here

 

 

Comments
  1. fans for you and me says:

    Very nice post and right to the point. I not really know if this sounds the best place to inquire about but don’t you folks have any ideea best places to hire some freelance writers? Thanks ahead of time :)

  2. Jackie Del says:

    Great story. I did saved your site. Keep posting. Cheers

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s