Skip to content

Phonegap, iOS and XCode4

dcousineau edited this page May 17, 2011 · 2 revisions

Quicks steps I used to get started with Phonegap, iOS, and XCode4. Note: I am by no means an iOS or Phonegap dev, this is the result of 20 minutes of Google and clicking random buttons.

  1. Download and extract Phonegap at http://www.phonegap.com/
  2. Install the iOS Phonegap SDK (path/to/phonegap/iOS/PhoneGapLibInstaller.pkg)
  3. Generate a blank XCode4 template at https://build.phonegap.com/generate
  4. Download and extract generated template
  5. Drop SpazHD in the www folder (I suggest renaming the existing index.html)
  6. Update SpazHD's index.html to add phonegap:
<!doctype html>
<html>
<head>
    <title>Spaz</title>

    <!-- ADD BELOW -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
    <script src="phonegap.0.9.5.min.js"></script>
    <!-- END ADD -->

    <script src="enyo/framework/enyo.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">
	sc.setDumpLevel(0);
	new Spaz().renderInto(document.body);
</script>
</body>
</html>
  1. Update Target Device Family in project build settings to be iPhone/iPad (see screenshot)
  2. Run project, target the iPad

At this point in time I just got it up and running, button taps (like adding an account) don't work, but the X and sidebar works. This just gets it up off the ground and into the emulator.

Clone this wiki locally