How to export to IOS with Ejecta

2

Stats

2,860 visits, 4,982 views

Tools

License

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.

Published on 5 Aug, 2013. Last updated 19 Feb, 2019

Ejecta is a great tool to export your game to the IOS platforms.

First of all, we have to say an enormous thank you to 0plus1

, who has done a incredible work for it, and shared it with the community. Thanks again to him, because with his work, we have now a tool working perfectly to export to IOS, very stable.

The avantages of Ejecta are numerous : stable (again lol), it supports the loading screen, you can change the first screen (what you can't with cocoon for example), and it has a far better use of the RAM than cocoonJs (I made a lot of tests).

Before continuing, english is not my mother tongue, so i'm sorry for the mistakes i can make :)

Here is the tutorial !

Note that you need a MAC to use Ejecta, as with CocoonJS when you really build your app.

The only way to try your app with Ejecta is to create an app and try it in Xcode, on the simulator or on your device (which i recommand), which is great i think, cause it's important to often use Instruments to really know your amount of Ram and FPS, and nothing is better than a "real" built, to test your game.

1 - Download all the files.

You have to download 3 files, 2 on your PC, and 1 on your mac.

1.1 - On the mac :

You can download the last stable version of Ejecta here

, and there is also a link on that page for the last beta.

I personnally use the stable one at the moment, and it works perfectly. Some notes on that point are at the end of the tutorial.

Once you have downloaded it, you will have something like that on your Mac :

Just leave it for the moment.

2-2 - On the PC :

You have to download 2 things :

The FNR file, here

, and the archive created by 0plus1, here.

(click on "download Zip on the little button on the right). Then uncompressed of course the archive.

3 - Export your game.

Export your game on HTML5, without minifying the script. If you minify it, it will simply not work.

4 - Prepare the files on the PC.

Here is the part that seems long and complicated at the beginning, but after a few days of use, you will be as quick as when you are trying your game on cocoon thru itunes :).

First, have a look at the folder of 0plus1, the uncompressed archive, named "C2_Ejecta_Master" :

We have 3 parts :

First, "Plugin", wich is the plugin you can use in C2 for special things concerning Ejecta, like the inApp purchase or the gamecenter. Put it in the C2 plugin folder, as every plugin. Note that it's not necessary to have it in your project if you don't use those features.

The 2 other parts are "exporters" and "integration". First we will use the exporter part;

4.1 - Adapt your HML5 export

First, open your game export folder, you will have something like that :

Now, open the "exporter" part in the folder C2_Ejecta_master : you have the choice between 2 files, but for the moment, chose the 2D exporter ('"EjectaXporter_2d") , the webgl one seems not working yet at my end.

Copy the exporter file in your game export folder.

Finally, do the same with the FNR file we downloaded before, and copy and paste it in the export game folder too.

You will have something like that :

Now, just double click on the exporter file ('"EjectaXporter_2d") : a black window opens, just let it go, some code appears, and then the window closes itself.

(Don't touch to the FNR file).

Your HTML files are almost ready to be placed in Ejecta.

4.2-Create the App folder

Now create a folder called "App" (not another name, cause it's the name Ejecta uses), and copy in this folder the file "C2runtime" and the "Images" folder you have in your game export folder.

Then, put the "index" file you will find in the "integration" part of the folder made by 0plus1 in the App folder too.

At the end, your "App" folder will be like that :

Done !

The last thing to do is to put the "App" folder on your Mac. Use Dropbox for example.

5 - Build the App with Xcode

The last part !

Go back to the Mac, and go to the Ejecta folder : replace the App folder by the new one you have created, and launch the xcode file (Ejecta.Xcodeproj).

Xcode opens, wait a few seconds to let him start and check its things, chose your target (ios simulator or your device), click run, and here it goes !

You have done your app for IOS :).

.

The forum has an Ejecta thread

. Tips and updates can been find in it :)

Notes

1- At the moment of the writting of this tutorial, a good thing seems to put "enable WebGl" in C2 on "off" : if it's enable, when you quit the app pressing the home button and return to it, the app freezes and crashes. Without Webgl, it works perfectly.

A point to follow in the future, when Webgl will be better supported.

Beside that, it seems you need the latest version of Xcode to use the beta. So if the beta is not working, just try with the stable version.

2- You can change the name of the app, the orientations, add your Apple Id dev, etc... Everything is explained in one of the help pages of Ejecta.

  • 0 Comments

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