How to export to iOS with Ejecta



6,105 visits, 11,785 views



This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Ejecta is an open-source wrapper designed to provide a high-performance way for HTML5 games to run as iOS native apps.

Getting set up

In order to test and publish with Ejecta, you will need a Mac running OSX and a valid iOS developer subscription, which is $99/year. For more information see How to become an iOS developer. It is strongly recommended to use the latest version of OS X, which is a free update as of OS X 10.9. You will also need to install Xcode. You can find this as a free download in the App Store.

You also need to download Ejecta. This is a free download from GitHub here: - click Download ZIP on the right. Note you must download Ejecta directly on to your Mac. If you download it to your Windows computer then copy it to the Mac, it will change the file permissions and the project will be unable to build.

Integrating with Ejecta features

Ejecta also provides support for iAd, Game Center and text input. To access these features, add the Ejecta object to your project.


The following features are not supported in Ejecta:

- The form control plugins (Textbox, Button and List) are not supported.

- The XML object is not supported.

- The Facebook object is not supported.

- The Text plugin's 'Set web font' action is not supported.

- The WebStorage plugin's session storage is not available. Use local storage or global variables instead.

Exporting for Ejecta

On your Windows system, in the Export Project dialog, choose Export for: Ejecta. You can only use this option when exporting for Ejecta - the HTML5 website option will not work. Copy the resulting exported folder to the Mac with Xcode installed.

Extract the downloaded Ejecta zip to a folder on the Mac. Remember it must have originally been downloaded on the Mac - downloading on a PC and copying it to the Mac will break it. Copy the contents of the exported project folder to the Ejecta folder, so it sits next to Ejecta.xcodeproj. Then, rename the exported folder to App, since all your project contents must be in a folder with that name.

Now double-click on Ejecta.xcodeproj to open it in Xcode.

Using Xcode

You should now see something like the image below in Xcode. The red circle shows where you can choose a simulator to preview with, or a real iOS device if one is connected and it is configured for development.

Click the 'Play' icon in the top-left to start a preview with the chosen simulator or device. It should start running your game!

You may wish to make some tweaks from Xcode, including the supported orientations, and the icons and splash screens. One thing you must change is the bundle identifier in Info.plist (under 'Resources'). Double-click it to open it and made sure you have a custom reverse-domain style identifier there, such as com.scirra.spaceblaster.

To change the orientation, select the appropriate orientation for the Initial interface orientation from the drop down menu in Info.plist. Don't use the Supported Interface Orientations buttons in the project settings since due to a bug in iOS they do not work.

Do not check any of the Supported Interface Orientations buttons in the project settings; leave them all unselected. There's a bug in iOS6 that prevents this from working correctly.

You might also want to rename the project; to do this, select the Ejecta item at the top of the project tree, press Enter, and type a new name. If Xcode prompts you to rename other project items, you should do so (click Rename).

Now you should be ready to go ahead and publish. Refer to Apple's documentation in the iOS developer portal to learn more about the actual submission process. Happy publishing!


  • Order by
Want to leave a comment? Login or Register an account!