Testing your CocoonJS Complied App – iOS

This tutorial covers installing a CocoonJS compiled app to test on your iOS device.

We are not going to go in-depth about each individual point, simply give a brief explanation providing links when appropriate.



For this tutorial you will need to make sure you have the following.

  • An iTunes account that’s part of the Apple Developer Program.
  • The latest copy of xCode on your Mac computer.
  • iPhone or iPad to install your app on.

Installing for iOS

For this first few steps of this tutorial, we you will be working in the iTunes provisioning portal to download and install certificates and provisioning profiles which are required to sign the code that xCode generates.

iOS Provision Portal

Create/Install an iOS Certificate

The first step is to make sure you have created a iOS certificate and that it is installed in your system. You only need to do this step once, so if you have created/tested an app in the past then you can skip this step.

If you do not have one created, then you can create a certificate by visiting the ‘certificates’ section of the provisioning portal, clicking the ‘add’ symbol, and filling out the form. When it has been created you will need to download and install the certificate.

More information about certificates can be found on the certificate section.

Create a new AppID

Next you will need to create a new AppID. The AppID is a unique identifier for your App.

To create a new AppID go to the App IDs section, which can be found in the sidebar underneath ‘Identifiers’, and click the add a New App ID.

  • App ID Description – This can be any value that is used to describe your app.
  • App ID Prefix – Choose any from the dropdown.
  • App ID Suffix – This must be the same as what you entered as the BundleId in Cocoon’s cloud compilation system.

For more information about App IDs visit the apple documentation.

Cloud Compilation System

Make sure that the BundleID you use for your project in the CocoonJS cloud compilation system matches the App ID Suffix that you enter.

Register your Testing Device/s

Before creating and installing a provisioning profile, we are going to register any devices we may want to test our app on.

We need to do this because the type of profile we are going to generate will only let you test your App on the devices you select.

To do so, go to the ‘Devices’ section and click the ‘add’ button. You will need to fill out a form with the following fields:

  • Name –
  • UDID – Is a Unique Identifier which every iOS device is given. You can find out your device’s UDID through iTunes.

Provisioning Profiles

With an AppID created, we need to create and install a few provisioning profiles.

There are three different types of provisioning profiles that can be used.

  • Development – This profile is used for developing an app. You do not need to use this kind of profile as the app itself has been developed by Cocoon’s cloud compilation system.
  • AdHoc Distribution – This type of profile allows you to test the project on a select few devices (you choose the devices to allow when creating the profile). The devices you choose are associated via UDID. This option is not designed for App Store submission but instead for testing. You can also generate a IAP file from the project.
  • AppStore Distribution – This profile is type you use when wanting to upload your project to the App Store.

More information can be found on Apple’s website.

Create a AdHoc Profile

We are going to create a AdHoc provisioning profile which we will use during development. To do so, go to the ‘Provisioning Profiles’ section in the sidebar and click ‘add’.

  • Type should be ‘Ad Hoc’
  • The AppID to select will be the one that we generated in the above steps
  • Choose the certificate that should be used.
  • Select the device/s you would like to test your app on.
  • Choose a Profile Name to identify the profile and confirm the details.

Once you have filled in the forms, the provision profile should be generated. You will then need to download and install that profile.

Create a AppStore Profile

While you are in the provision section, you should create an AppStore profile. The process to follow is very similar and you will need to download and install that profile as well.

You do not need to do this step right away, but it will save time as you will not need to do it later when wanting to release your app.

We are now done in the provisioning portal.

Connect your Device to your Mac

The next few steps are a bit easier. You will now need to connect your device to your Mac so that when we open the ‘xcodeproj’ file we can build/test it on your device.

Open your xcodeproj file

With the profiles and certificates now installed, you should now be able to open the xcodeproj file generated by the CocoonJS cloud compilation system in XCode.

Select your Device and Run

In XCode, select the device you have connected to your Mac. This will mean when we can then run the project on your device. You cannot select an iOS Simulator for this task, as they are not supported.

You can find the dropdown in the top-left corner of the XCode screen, next to the ‘play/stop’ icons.

With your device selected you should now be able to press the ‘run’ (play icon) and in a few seconds your app should launch on your device. A few pop-up windows may appear during the process (mainly around code signing).

Now you should find your app on the device. You can launch it at any time.

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="">