O'Reilly logo

Building HTML5 Games with ImpactJS by Jesse Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Compiling for Native iOS

You can also distribute your game as a native iOS app. Impact comes with an Xcode project that you can use to compile a native iOS game. Everything you need to run the project is located in Impact’s source in iOSImpact.zip. There is also a PDF with additional instructions. We’ll take a quick look at how to copy over your game into the Xcode project and get it to compile.

In order to get this to work, you will need to register as a developer on Apple’s site, which costs $100 annually. Once you are registered, you will need the latest version of Xcode. (In this book I am using Version 4.2.1 and OS X 10.7 (Lion).) You can use an older version of Xcode and OS X, but it is usually best to compile with the latest version of Xcode. It’s also important to note that this is still an experimental feature, and at any point, Apple could start denying games created like this.

Unzip the iOSImpact.zip file and launch Xcode. Once you are in Xcode, click on Open Other... at the bottom of the welcome launcher.

Select Open Other from Xcode’s welcome screen launcher.

Figure 8-8. Select Open Other from Xcode’s welcome screen launcher.

Simply navigate to where you unzipped your iOSImpact project and open it up. You should see a screen similar to Figure 8-9.

Our iOSImpact project in Xcode.

Figure 8-9. Our iOSImpact project in Xcode.

While I am not going to be able to cover ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required