Word Up Dog: Creating iPhone apps on Windows with Adobe Air

Word dog on the iPad
Word Up, iPad!

I’d already optimized my new Flash game Word Up Dog to run on mobile phones, and used Air to package a version that I could sell in the Android app store. Now for the next challenge: the iPhone.

Shortly after Adobe announced the tools for compiling Flash code into iOS apps, Apple banned the process as part of their ongoing spat with Adobe. Happily they retracted this bit of bs six months later, so we are free to experiment with Air for iOS once more. God knows if we’ll ever view Flash websites on an iPad browser, but this is a start.

Building Air for the iPhone is similar to the Android process, but generating the security certificate requires paying Apple $99 for a developer license (Android is free), then dancing back and forth uploading and downloading files from their website. Although you need a Mac to write iOS apps in Objective-C, you can compile Flash AS3 code into iOS using Mac, Windows, or Linux. I used Windows, along with OpenSSL (instead of Keychain) to generate the security bits, and iTunes (instead of Xcode) to install the app onto my phone.

Here are the steps:

  1. Download the Air 2.6 SDK, paste it into a copy of your Flex SDK directory, and set FlashDevelop to compile using the result
  2. Download OpenSSL
  3. Start a new FlashDevelop AIR AS3 project
  4. AddChild your existing game in Main.as
  5. Add NativeApplication handlers to prevent the phone from idling
  6. Modify your application.xml to add iPhone-specific settings
  7. Sign up for a $99 iOS developer account
  8. Generate a key by calling
    openssl genrsa -out SarahNorthway.key 2048
  9. Generate a certificate signing request with
    openssl req -new -key SarahNorthway.key -out WordDog.certSigningRequest -subj “/emailAddress=youremail@domain.com, CN=Your Name, C=US”
  10. On the Apple website, upload WordDog.certSigningRequest, create a provisioning profile for your iPhone and download WordDog.mobileprovision and developer_identity.cer
  11. Generate a pem file with
    openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM
  12. Generate the p12 certificate with
    openssl pkcs12 -export -inkey SarahNorthway.key -in developer_identity.pem -out WordDog.p12 -passout pass:yourpass
  13. Build your air project to create WordDog.swf
  14. Compile the final ipa file using
    adt -package -target ipa-app-store -provisioning-profile WordDog.mobileprovision -storetype pkcs12 -keystore WordDog.p12 -storepass yourpass WordDog.ipa application.xml -C . WordDog.swf Default.png iconsFolder (this takes a few minutes)
  15. In iTunes, drag WordDog.mobileprovision and WordDog.ipa into the library
  16. Find your game in the iTunes library apps, drag it onto your phone and sync

Wheuf! A few extra steps and security files in there, but it’s all worth it, so we can sleep safe knowing nobody is installing homebrew apps on their own iPhones without paying Apple first.

Sarah Working
Me hard at work... or trying to beat Fate of the World?

Unfortunately Air 2.6 only supports iPhone gen 3 and above, but this is probably for the best considering how much more processor intentive the Flash code seems to be compared to Objective-C code. Word Up Dog runs well on a 2nd gen iPad, but it still drops to 15 fps when moving the map around, so I’m going to have to go back to optimization before I can release it on the app store.

flattr this!

21 thoughts on “Word Up Dog: Creating iPhone apps on Windows with Adobe Air

  1. Hey Sarah,
    Neat to read that someone is going through the exact same process as I am right now: I havn’t gone as far as to deploy to an iOS device, yet. I already got stuck running my game on Android, since the frame rate drops below 20 a lot despite all the optimizations I’ve made. I guess I have no choice but to use blitting after all. Good bye MovieClips…

    Anyways, thanks for sharing all this information once again, it’ll sure help me once I get to tackle iOS deployments.

    And on another note: I havn’t followed blogs a lot in recent years (probably cause they were the wrong ones) but your cooperative blog sure is one of the most exciting ones to follow these days. Keep up the good work!

    Cheers,
    Michel

  2. Thanks so much for such an informative post. I’ve been struggling with exactly this process for a while now and had given up. Signing apps is always a giant pain, and being an open source windows dev much of what I find only is Mac-centric.

    The good news is that if you wait for Flash 11 (MOLEHILL) all the rendering can be done on the 3d hardware using openGL so drawing performance will not be an issue in the slightest since Molehill for AIR (running with unbelievable speed on mobile devices) is already in beta. Don’t waste too much time optimizing using old fashioned bitmapdata etc as it will all be obsolete by winter and you’ll instead want to use textured quads in “3d”.

    Much appreciated, and keep up the great work!

  3. Woah! I’m really loving the template/theme of this website. It’s simple, yet effective.
    A lot of times it’s tough to get that “perfect balance” between usability and visual appeal. I must say you’ve done a very good job with this.

    In addition, the blog loads super quick for me on Opera.

    Superb Blog!

  4. Good day! I know this is kinda off topic but I was wondering which blog platform are you using for this website?

    I’m getting fed up of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be great if you could point me in the direction of a good platform.

  5. SEO also known as Search Engine Optimization is considered to be the most significant
    part for any internet corporation as it is helping
    the people to run their trade in an optimized manner.
    You would end up paying a fortune for unnecessary
    tweaks and SEO operations that are not required
    for your website. It is therefore important that an online article submission service
    is engaged to provide SEO services that will boost the ranking of the
    website.

  6. Hi are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and create my own. Do you need any coding knowledge to make your own blog?

    Any help would be really appreciated!

  7. I loved as much as you will receive carried out right here.

    The sketch is tasteful, your authored subject matter stylish.
    nonetheless, you command get got an shakiness over that you wish be delivering the following.
    unwell unquestionably come more formerly again since exactly the same nearly
    a lot often inside case you shield this hike.

  8. Great blog here! Also your web site loads up fast!
    Whaat host are yoou using? Can I get your affiliate link too your host?
    I wish mmy site loaded up as quickly as yours lol

  9. Hi there! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing several weeks of hard work
    due to no backup. Do you have any solutions to protect against hackers?

  10. First off I would like to say terrific blog! I had a quick question that I’d like to ask if you don’t mind.

    I was curious to find out how you center yourself and clear your thoughts prior to writing.

    I’ve had a tough time clearing my thoughts in getting my thoughts out there.
    I truly do enjoy writing however it just seems like the first
    10 to 15 minutes are wasted simply just trying to figure out how to begin. Any ideas or tips?
    Appreciate it!

  11. Besides, it likewise allows players to open brand-new levels or even acoid current level if
    they are having a difficult time completing it. It can be used being an annual tool
    too compare projections to actual financials or it can be used to get
    lenders, investors as well as venture capitalist.

    Reaching the 10,000 minimum point level is easy and in many cases
    in the event you makke the bombs in 10 to 15 moves, the bonus you will gett for unused moves and special candy pieces ffor the board wilpl push you
    over that threshold.

Leave a Reply

Your email address will not be published. Required fields are marked *