Exporting for iPhone using Air 2.7 and FlashDevelop – Part Two, Creating an iPhone Project
Continuing on from Part One of the Exporting for iPhone using Air 2.7 and FlashDevelop Tutorial you should now have FlashDevelop primed with the Flex/Air 2.7 SDK and you’re now ready to start building your amazing iPhone App. In Part Two you will see how to set up an iPhone Air project which will allow you to export an swf ready to be packaged up into an ipa file (the file format for iPhone Apps).
Developing for iPhone (and mobile in general)
We’ll skip through actually coding your application as this is a topic in-and-of itself, but for the most part it’s no different to coding any other SWF, you just have a few more considerations to make, eg. the touch interface and importantly, memory management. I don’t mean to brush over the topic but it will have to be covered in another tutorial.
Installing an iPhone/Air Template into FlashDevelop
In order to create iPhone projects the easiest thing to do is to install a template into FlashDevelop. Here’s a template you can download that I use:
The original was created by a German blogger and contains a couple of handy dynamic .bat files that you will use to package your .swf into a .ipa file. I’ve editied it a little bit so that works with Air 2.7.
Once you’ve downloaded and unzipped the template you can install it into FlashDevelop by copying it into the correct Projects folder. This one confused me for a while as there are two projects folders. One is part of the FlashDevelop install directory and the other is in your user appData folder. There is a handy shortcut from the FlashDevelop interface that will open up your appData folder and it seemed to make sense that this woud be the location to copy the files to, but I’ve only been able to get results by copying directly into the applications install directory, so that’s what we’re going to do here.
Once you find FlashDevelop in your Program files directory (hint if you’re using a 64 bit system it will be installed into “Program Files (x86)” ) go in to the directory named Projects. Here you will see that there are already some Project Templates installed as they come standard with FlashDevelop. Copy the downloaded iPhone/Air Template into this folder. Once you restart FlashDevelop it will be there for you to select when you choose to create a new Project.
In Part Three we will export our project and learn how to get a certificate from Apple in order to export and package up the swf into an ipa file.
Part 1 – Installation
Part 2 – Creating an iPhone Project
Part 3 – Generating Developer Certificates, Provisioning Profiles and .p12 Files
Part 4 – Creating an Air Certificate and Compiling to .IPA
Part 5 – Loading your .IPA File onto a Test Device