HTML and CSS Reference
In-Depth Information
Testing CocoonJS in iPhone
As of this writing, Ludei had just released its iOS SDK, and the Launcher App was not yet approved in the Apple
App Store. To test your app on iOS, you need to run through an involved process that requires you to modify the
downloaded file's Bundle ID, generate an add-hoc provisioning profile on developer.apple.com , and use XCode
to create an .ipa file. Rather than detail a process that will hopefully be obsolete by the time this goes to print,
you should check the latest details on the Ludei wiki at http://wiki.ludei.com/cocoonjs:launcherios for how to get
the launcher up and running for iOS.
Building Your App in the Cloud
As of this writing, Ludei has not yet opened up its cloud service for building apps in the cloud for public con-
sumption. When it does, you can build native apps without having to download XCode or have the Android
SDK installed on your machine.
For iOS development, you still need to create an account on developer.apple.com and join the
$99-per-year iOS Developer Program at https://developer.apple.com/programs/ios/ . This enables you to create
and distribute apps in the Apple App Store.
Building Apps with the AppMobi XDK
and DirectCanvas
AppMobi is an alternative to CocoonJS for packaging up HTML5 apps as native apps on iOS and Android.
AppMobi built its technology on top of the open-source PhoneGap project, which uses a native web-browser
component augmented with native device APIs, such as audio and video recording and access to contacts stored
on the device.
As mentioned in the last chapter, work done during Impact.js development to create iOSImpact was used to
develop the initial version of AppMobi's DirectCanvas, which replaces the standard <canvas> object with a
custom, OpenGL ES accelerated implementation.
Understanding DirectCanvas
DirectCanvas works a little differently from CocoonJS in that it requires that you split your game into two parts.
The first part is an initial HTML file that connects to the primary PhoneGap web view, which has a normal
DOM and can accept user input. The second component is JavaScript only and consists of the main portion of
your game that draws to the hardware-accelerated Canvas. This second component cannot bind any listeners to
get touch input however, so you need to pass that information manually from the first piece to the second using
a bridge that DirectCanvas provides.
Search WWH ::




Custom Search