Ejecta workflow for iOS

Index

Stats

1,587 visits, 4,023 views

Translations

This tutorial hasn't been translated.

Tools

Update in progress!!!

This tutorial is current as of Release 200. The official Scirra Ejecta plugin instructions can be found on the Beta Release 165 release notes. I kept the original steps for implementing the unofficial Ejecta plugin but moved them to the bottom in case someone may still want to use the older method. The info here for xcode and iTunes Connect is still valid.

Okay, I made another game and tried to use the Intel XDK to publish but I couldn't get it to compile so I'm back with an update to my Ejecta workflow because it is the only way I can get a game out the door and into the store. Now I've added an IAP to unlock a level and remove ads. It seems to be working really well following these procedures. I'm waiting for the app approval to test the actual distributed app. I also managed to publish for Android with IAP and AdMob which was a real shocker but it works. For right now the only update is the addition of the next section, Oddities. IAP isn't really an Ejecta feature but it was part of my process and an important part mobile

Oddities

1. When testing with Xcode in the simulator and on a device, I would be asked to login to my account when the app started the first time. I could close out the game and restart without having to login a second time. Even though my store code was on a separate Layout that was not called unless you click the purchase button.

2. Purchases were not working in the IOS Simulator. But on the device (logged into my test account) I could make the purchase. (take-away, Scirra IAP plugin works as advertised)

3. Restoring did not work at all. But trying to purchase the game again would restore the purchase. I'll post my new code when I have more time. Once the game is available in the store I'll retest all the features and post an update.

4. If you plan on using the same IAP code for android, be sure to use a name that's all lowercase, numbers, dot(.) and underscores(_). I had uppercase for IOS and had to change my purchase IDs. It would be simpler to use ID's that can work in both stores.

Ejecta to iOS Workflow

This tutorial is designed to walk you through the process of testing an iOS app in Xcode with Game Center and iAd functionality using the Ejecta plugin. Publishing is just one step further that I won't cover here because there are simple walk-thru's located on iTunes Connect. My intent is to just cover the process peculiar to Ejecta and my experience getting my Construct2 game to work.

Prerequisites

OSX 10.? either a hardware or virtual machine.

Xcode development software for OSX (free in App Store)

iOS developer account ($99/year at Apple Developer Website)

Construct 2 Beta Release 166 for official plugin or earlier if using Ejecta Kitchen.

Sources:

Scirra Ejecta plugin instructions

iTunes Connect Support - website

Prepare game in iTunes Connect:

You could technically do this after exporting your game and setting it up in Xcode. Either way, your bundleID, version, and Leaderboard ID will have to be the same in both iTunesConnect and your project.

1. Login to your iTunesConnect.apple.com account.

2. Click 'Manage Your Apps'.

3. Create your app or select one from the list.

4. Click 'Manage Game Center'.

a. Enable Game Center if not already selected. Then click 'Add Leaderboard'.

b. Select appropriate type: single or combined. I will be using single in this tutorial.

(1) Enter the information as it applies to your game. The 'Leaderboard ID' is the string we will use in Construct to send our high scores.

(2) Add a Language for localization in all your target tongues. At least one is required. Be sure to add leading spaces to the Score Format Suffix if you want 10 pts instead of 10pts.

(3) Click 'Save'.

5. Now, set up your iAd account via the 'Grow Your Business With iAd' link if you haven't already.

Construct 2 Project Prep for Xcode

1. Open/Create your project.

2. Add the Ejecta object to any Layout to make it available in the whole project.

3. Add Ejecta Conditions and Actions as desired. Here's some of the early logic I am using.

4. Export your project using the new 'Ejecta' plugin to a folder named App.

5. On your OSX system, download Ejecta and extract the files. Downloading to your PC then transferring the files will break the build so just download them to your OSX system.

6. Now copy over the App folder containing your Construct project to the extracted folder from the previous step. You could also save time and export the project directly into this folder if you are networked. It should look like this:

Xcode test setup

1. Open your Ejecta.xcodeproj file in Xcode,

2. Click on Ejecta in the Targets list, change the Bundle Identifier in the General tab to com.yourname.(leave this alone). Then edit the 'Identity and Type' Name to your app name. This will change the project file name and your bundle identifier suffix. Follow the prompts...

3. Check the Bundle Identifier, it should be the same as your iTunesConnect information. If you don't see the change, try clicking the Project file, then back on the Targets file. Change the Version to match your iTunesConnect profile. And increment the Build number each time you submit to the App Store.

4. Finally, build and run the app. If the app is not working, scan the output in the debug area for errors and clues.

iAd Network

1. Log into iTunes Connect and set up your iAd account via the 'Grow Your Business With iAd' link. (if not already prepared.)

2. Add Ejecta actions to your project to show or hide the ads as applicable. I was using the start and end of layout.

3. Examples running in the simulator are shown below, would be nice if they were centered in the screen but maybe that'll come in a future release of Construct/Ejecta (btw, I'm not using iAds in the release version of this game therefore the layout is not tailored to the ads):

Wrapup -

Many thanks to everyone that contributed to the Ejecta method! Your tutorials, info, and plugin really saved me a lot of time getting my game to the App Store. I wasted a lot of time with an intelXDK export that was rejected.

  • 0 Comments

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