Using Kiwi.js with Cocoon.js on iOS

This tutorial will cover the process of designing and programming a Kiwi game for use with Cocoon.js and also the necessary steps to test the game on the Cocoon Launcher App on an iPad.

What is Cocoon.js?

Cocoon.js is a platform developed by Ludei. It provides the ability for developers to produce, accelerate and monetize their HTML5 Kiwi games for use in the AppStore and Google Play.

Developing for Cocoon.js

Developing your Kiwi game for Cocoon is very simple and requires almost no changes to your existing code. Kiwi is designed to adapt easily to either browser or Cocoon development.

We need to adjust our html file as Cocoon only supports the following tags: <script/> tags, <canvas/> tags, <image/> tags and <audio/> tags.

We also need to tell the game to target Cocoon as the default platform.

instead of

Note that currently all HUD elements of the Kiwi.js library are not supported in games that target Cocoon.js.

Testing Your Game on the Cocoon Launcher on iPad or iPhone

Now that you have developed a game for Cocoon.js the next step is to test the game using the Cocoon Launcher App. Head over to the app store on your iPad or iPhone and download the CocoonJS app by Ludei. This app allows us to test the compatibility of our game with the Cocoon.js library without having to publish our game to the app store. It is always advisable to test your game this way before proceeding with publishing.

To add your game to game to the app you need to upload a zip file, containing the javascript, html and assets of your game, to your iPad. Connect your iPad to your iTunes and go to the app tab.

Further down the page is a section labelled ‘File Sharing’. Select the Cocoon.js app from the list and use the ‘Add…’ button to add a zip file to the app.


Now open the app on your iPad, choose ‘TEST’ and locate your zip file in the documents tab.

photo (3)photo (1)

Selecting the zip file will unzip it and run the game.


If all is working correctly, the game will play as normal on the iPad. This means that the game is suitable to run on the Cocoon.js system.

The next step is to compile your code using Cocoon.js’s Cloud Compilation service and upload your app to the appStore. We have a tutorial explaining this process coming very soon.

Share the joy

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">