Tutorial: Building your application for the iPhone

This tutorial enables you to configure ELIPS Studio to build your app for the iPhone.
It is intended for ELIPS Studio users willing to deploy applications on the iPhone using Mac or Windows.

There are 2 ways to build your app for the iPhone:
- a hybrid toolchain that requires XCode and therefore a Mac
- a pure Windows flow, allowing to build an iPhone app without XCode, on a Windows PC

This article describes how to setup ELIPS Studio for those toolchains.

 

Introduction to the iPhone build toolchain flow

Once you have developed your application in ELIPS Studio 3 / Flex Builder on a Windows PC (or a Mac), there are two iPhone build options available to you:

  1. Generate IPA package: Microsoft Windows flow that results in generating an unsigned package that you can deploy on your development iPhone. Note that support of iPhone certification on Windows shall be made available in a future release.

  2. Generate XCode project: Mac (or Hybrid Mac/Windows) flow that results in generating an XCode project. The project can then be compiled and signed on a Mac using XCode. This mode allows publishing the final package on the App Store.

The next sections explain the setup and the build flow in more details, for each of these 2 solutions.

 

Build your App for the iPhone: Mac / Hybrid XCode based Toolchain

Installation

  • On your Windows or Mac: you need to install ELIPS Studio plugin for Flex / Flash Builder.
  • On your Mac: In addition, you will need XCode together with a developer / distribution certificate to be able to sign your app for iPhone.

 

IMPORTANT NOTES ABOUT XCODE
  • XCode version 3.1.4 (or later) must be installed on the Mac.
  • Snow Leopard known issue: If you've upgraded to Snow Leopard after having installed XCode, you need to reinstall XCode. This is a known issue from Snow Leopard, the upgrade removes make, which is needed for this compilation.

 

Step 1: Generate XCode project in ELIPS Studio / Flex builder

Open ELIPS for Flex Builder and create a project (or open an existing one). This document shows PuzzleApp sample available on ELIPS Studio 3 developer zone.

Edit "Targeted Devices" from the project properties: iPhone device is now available. Check iPhone and click "Edit by Platform" button.

Setup

 

Fill the iPhone settings as follows:

  • Application Icon: optional (57x57 PNG) – if not set, a default icon is used.
  • Application Name / Version
  • Company Name
  • Upload Directory: path where the XCode project and the C++ sources will be generated. This can be set to a folder, or a shared drive, or even a USB key. In our example, we set it to:
  • D:\iPhone_code

  • Toolchain Type: Choose "Generate XCode Project"
  • iTunesIcon Icon: Artwork to be used in iTunes (512x512 PNG)

Setup

 

Once you selected "Apple – iPhone" device in ELIPS Studio plug-in, you can build the application for the iPhone using the button "Build ELIPS Package For Current Device"

Setup

 

At the end, a message like this is displayed:

Upload finished (XCODE project available under D:\iPhone_code\Flex_Flex_FlexBuilder_3\PuzzleApp\iPhone_Release\xcode)

 

Actually, build is not complete, but an XCODE project has been generated, alongside with the whole generated source tree.

 

Step2: Build the app for the iPhone on the Mac

If you were working on Windows PC for step 1, you obviously need to copy the generated source tree to your Mac (through an USB key, shared folder, etc.). The generated files to copy are in the path as notified in the message "Upload finished", in our example, it is the content of folder:

D:\iPhone_code\Flex_Flex_FlexBuilder_3\PuzzleApp

 

IMPORTANT NOTE
You need to copy the complete generated folder (the complete content of the Upload Directory specified above), not only the iPhone_Release\xcode folder. If you copy only the iPhone_Release\xcode folder, it will not build in XCode.

 

Setup

 

In Mac OS X, double click on the project file to open XCode:

Setup

 

Select "Device – 3.0" and "Release", then click on "Build and Go" button to build generated code and upload the application on your iPhone device.

If you want to simulate on the Mac, select "iPhone Simulator 3.0" and "Debug".

IMPORTANT NOTES ABOUT XCODE BUILD CONFIGURATIONS
"Device X.Y – Debug" and "iPhone Simulator X.Y – Release" configurations do not work. Please be sure to select "Device X.Y - Release" or "iPhone Simulator X.Y - Debug.
Note that if you have tried to build in one of the failing configurations (Device - Debug or Simulator - Release), you need to do a clean build by first doing a "Clean all targets", then a build.

For all matters related to Xcode, Certificates and publishing on iTunes, please refer to the official iPhone Dev Center

 

That's it! You can now build your application for the iPhone, test it on your device then generate a distribution version of your app using XCode!

 

Build the app for the iPhone: PC Windows Toolchain

Installation

  • you need to install ELIPS Studio plugin for Flex / Flash Builder 3.2.
  • you also need iTunes for installing your app on your iPhone.

 

Step 1: Configuration

As for the alternate Mac / Hybrid Toolchain, Open ELIPS for Flex Builder and create a project (or open an existing one).

Edit "Targeted Devices" from the project properties: Check iPhone and click "Edit by Platform" button.

Setup

 

Fill the iPhone settings as follows:

  • Application Icon: optional (57x57 PNG) – if not set, a default icon is used.
  • Application Name / Version
  • Company Name
  • Upload Directory
  • Toolchain Type: Choose "Generate IPA Package"
  • iTunesIcon Icon: Artwork to be used in iTunes (512x512 PNG)

Setup

 

Step 2: Build!

Once you selected "Apple – iPhone" device in ELIPS Studio plug-in, you can build the application for the iPhone using the button "Build ELIPS Package For Current Device"

Setup

 

At the end, a message like this is going to be displayed:

Everything is Ok
Copying C:\My Documents\Open-Plug\My Systems\Flex_ElipsS\PuzzleApp_cab\ARM_Packages_Release\PuzzleApp.ipa to C:\My Documents\Open-Plug\My Systems\Elips3\PuzzleApp\output\Apple - iPhone\PuzzleApp.ipa

Step 3: Install your app on your iPhone

Providing your iPhone supports unsigned content, you can now copy your application IPA Package to your "development" iPhone using iTunes:

  • double click on the IPA file to have it included in iTunes apps library
  • then sync your iPhone apps to have it installed.

That's it, it's that simple! You can now test your App on your iPhone!

 

Note that, in order to publish your app to Apple's App Store, you will still need to sign it. We will soon provide an add-on to sign it on your Windows PC, until then you need XCode for that step.