Upload Construct 2 App to Apple

Hi Constructors! Here is a very straight forward way to get your .capx file running as an XCode app. Just one rule, if something doesn't make sense, please first Google it yourself and try to find and teach yourself how to do it, nothing compares to or beats learn-by-doing in my experience, but if its really impossible you can contact me or comment below (preferred).

Prerequisites that you absolutely need, NO exceptions:

1) A Construct 2 private or business license (especially if you hope to make money with your app): https://www.scirra.com/store/construct-22) Your game, it can be finished or a testing version, but must be a .capx file3) Some type of Mac computer (very important, if you don't have one, ask friends)4) Some testing device(s), the more the better, with possibly current supported iOS versions (extremely important, do not submit anything before thoroughly testing it yourself)5) XCode installed on the Mac: https://developer.apple.com/xcode/downloads/6) Apple License: https://developer.apple.com/programs/start/standard/7) CocoonJS account (my tutorial, so export it my way or figure it out yourself with Ejecta or PhoneGap, but CocoonJS > others): https://sso.ludei.com/ and sign up8) Icons and Launch images. 1 AppStore Icon of 512x512 pixels, and then a whole lot of app launch icons: 320x480, 640x960, 640x1136, 768x1004, 1536x2008, 1024x768, 2048x1496. (Note: if you think your game loads fast, simply create these launch screens as black boxes.)

Let's Get Started

After all the prerequisites are met, you will have everything necessary to create a fully working Apple iPhone or iPad app. First, let's open our game .capx file.

Your Game Export Process

So you've assumably created a wonderful game, which in itself is a great and rewarding experience. Congratulations! I mean it! :DYour dream has become a reality thanks to Construct 2 and you want to share this vision with the whole world, or more specifically iPhone and iPad users.Hopefully beforehand you looked up your desired device(s)'s screen resolutions, and limitations such as memory, app size, social feature support, IAPs, etc etc etc. In this department I cannot and will not help you unfortunately, but I'm assuming you've already done all that by yourself. ;)So, open up your game, go to:File > Export > CocoonJS > and in the pop up select some way your sprites should be or not be compressed, and whether or not you want your code to be minified. Then hit the magic button to start exporting it somewhere like your Desktop or Dropbox. Depending on the style you are or are not compressing your sprites, this process should take 30 seconds to 15+ minutes :)Once the exporting process is finished, you will get a confirmation pop up and now you can safely close Construct 2. With this new folder, its time to head over to https://www.ludei.com/

Ludei and CocoonJS

Just in case you don't know, Ludei provides us with a very nice wrapper designed specifically for HTML 5 games.Sign in or sign up > click the 'DEV PORTAL' tab at the top. You should see Your Projects, and most likely its blank right now. Click the green '+ New Project' and add your project, its really simple and should be self-explainatory.Once its added to the Dev Portal, you can click on it to edit it. Here you will see a whole bunch of options which you will only need 3 of for Apple.

Under 'General', give your game a name, Bundle Id (com.companyname.gamename), Version (1.0 for now), choose your Orientations, and Scaling methods. Once that's all done, hit the blue 'Update Project' button.Under 'iOS', upload your AppStore icon (the one players will press to start the game) and the Launch Images. All of them. No exceptions, even if your game is iPhone exclusive, still need iPad. You can load Optional assets, but they're optional. See what I did there? >_>Alright, all set up and happy? You 100% sure? Maybe go and double check to be really REALLY sure, because making an .xcodeproj is going to take about 20 minutes minimum. Okay, cool. Then let's do this! Go to 'Compile Project', add your zip of your game, select only Compile project for Apple AppStore (iOS), run using Canvas+ (best in my opinion for almost all games), use 2.0.0 beta compiler, accept the terms of service, sell your soul to Apple and Compile that game!! WOOOOO!! Now wait something like 20 minutes for the Ludei dudes to send you the .xcodeproj to your specified e-mail. In the meantime, you can prepare iTunes Connect to upload your final finished game. You will NEED a Mac now.

Apple Time

Go to https://itunesconnect.apple.com/ and sign in, of course on a Mac computer. Go to the Member Center and click on 'iOS Provisioning Portal'.

Certificates and Provisioning

From the Member Center, click on iOS Provisioning Portal, then click on Certificates, and under this there is a tab called Distribution. You will need to request a certificate.

App IDs

Still under the Provisioning Portal, click App IDs and create a new App ID. Enter the name of your app and the Bundle Identifier (com.companyname.gamename), and click submit.

Provisioning

Go to the Distribution tab, and click New Profile. Choose App Store as teh Distribution Method, and enter a profile name (keep it simple, i.e. YourAppName Profile). Select the App ID you just made before this step and click submit. The new distribution will be listed, so download it.

iTunes Connect

Go back to https://itunesconnect.apple.com/ and click on 'Manage Your Apps'.In the upper left corner is a blue button with 'Add New App'. Once you click on this, you will get this sentence "You have no eligible Bundle IDs for iOS apps. Register one here." Click on here.Under App Services, you need to decide what to fill in there, like does your game have IAPs or use Push Notifications? Fill all that out and click Continue.Fill out all the information (only you know what your app has and doesn't have or need). At the end you will need to upload the App Icon and screenshots. Click Save.Your app will now be ready to upload. Click on View Details next to the app, then the Ready to Upload Binary. Fill out whatever they want and your status will change to Waiting for Upload.

XCode

Open up xcodeproj you downloaded that Ludei/CocoonJS in XCode. Go to the Organizer window (open it up under Window>Organizer). Find the provisioning file you created (the file looks like a cog wheel with PROV on it) and drag & drop it into the Provisioning Profiles library (folder on the top). You should also see your app on the left hand side with a blue paper icon, click on that, and under Targets click on your game. Here you can change for which device you want your game to be, iPhone exclusive (iPhone 4 and 5), iPad exclusive, or Universal (both iPhone and iPad).

Also here make your version 1.0 or whatever. Under Build Settings, make sure

that the Code Signing is filled out, its pretty self explainitory. Again on the left hand side where the game with the blue icon is, click on the drop down arrow, find the .plist file, and make sure the Bundle identifier is com.companyname.appname.

Final Steps

Make sure you have your test device connected to the computer. In XCode, you will need to compile the project, and you can actually see and run it on your device natively now. At the top, change this drop down bar to Name's iPhone/iPad (whatever you have) and hit Run/Build for Profiling. If everything works fine, your device should open up the app after building it for a few seconds/minutes. If something failed, Google what it says and fix it. (This last part shouldn't be too hard, but every app is unique so many things can go wrong. To all of you out there who know how to do this better, please lemme know and I will update this guide)

If everything looks good, go to Product > Archieve in the toolbar at the top of your screen. You need to validate your game, and then you will be able to submit!

Once you submit your app to Apple, you will need to wait 1 or 2 weeks for Apple to test and approve your game. Good luck! :)

Unlock your full gamedev potential

Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!

Comments

One other useful tip for iOS: If you create an Adhoc archive you can transfer the IPA file to a device using the iPhone config utility rather than iTunes.Download here; support.apple.com/downloads/#iphone configuration utility It's also useful for transferring apps to others for testing.