Installing to iOS device directly via AIR 3.4

Flash hasn’t died yet, and this great new feature is definitely an improvement. You can now deploy directly to device without a Mac and now without using iTunes. You still need iTunes on the computer. Here are some instructions on how to do it. First install AIR 3.4 on your Windows machine:

Just get the ZIP version and make a folder on your C drive “c:\air3.4”. I’ve made a habit of putting command line programs right on my C drive to save headaches. I notice one problem, your builds have to use your “Ad Hoc Provisioning Profile” AND “Deployment – Ad Hoc” or you’ll get a “Installation Error: PackageExtractionFailed” error. I also got “Installation Error: PackageInspectionFailed” but I recompiled to fixed it. Hopefully they’ll fix this soon because Google is not turning up anything about those errors. Eventually it would be great for remote debugging builds, but for now if I notice anything funny, I’ll just build a debug version and install using my Mac as usual. Here are my iOS publish settings:

All you have to do is publish your app and in the folder of the resulting IPA you can create a BAT file to uninstall and install the app in one shot. Now I don’t have to run to my iMac just to install. Here is my BAT file, please let me know if it needs improvement. This assumes you only have one iOS device attached (via USB) to your Windows machine:

@echo off
echo Uninstalling ...
call c:\air3.4\bin\adt -uninstallApp -platform ios -appid com.mysite.MyGame
echo Sleeping ...
ping -n 5 >nul
echo Installing ...
call c:\air3.4\bin\adt -installApp -platform ios -package MyGame.ipa

I put a sleep in there because sometimes when I uninstall the device blanks out for a few seconds, but sometimes it doesn’t and works fine. Anyway, I’m using this script to dramatically increase my device testing time. Good work Adobe!


  1. OMA says:

    With the latest versions of AIR (or iTunes, I’m not sure), you can even install without uninstalling first (only in iOS), which updates the app without deleting local storage, which is very handy for applications which must download external data to the device.

  2. Pablo says:

    One thing I just noticed, that maybe could be of use for someone else, the PackageInspectionFailed could be caused for some kind of character combination in the code, for example, I just caused that error by simply commenting something using /* and */, I then removed that and just deleted the code, and voila, no more PackageInspectionFailed error.

    It’s worth to notice that the Flash Builder IDE made all my code white, it means, the special colors of the editor were gone, when I commented using /* and */. It happens sometimes the same when you use regexp.

    • Same experience Pablo. It complained about an extraneous space before the XML declaration at the top of the MXML file, and getting rid of it seemed to fix the context-highlighting issue, but I’m still getting the PackageInspectionFailed error as well.

      • Hey Pablo. I created a new workspace and abandoned the old and with it went all my problems. I’ve had workspaces corrupt before (keeping my files on dropbox can exacerbate the problem) and it’s a simple if annoying fix for many ails.