Faster way to install iOS .ipa apps on testing devices
Monday, December 06, 2010
Note: This steps in this tutorial require OS X. I have no idea whether jailbreaking your phone will have an impact on these steps, but my devices are not jailbroken, FYI.
If you're creating apps using Flash, you'll know that a development build will produce a .ipa file. This is just an app archive. You can rename it to .zip and unzip it. Inside, you'll find the actual app – named Main.app for example.
Until today, I was only aware of one way to install the app. Drag it into iTunes then sync to my device. There were a couple problems with this. First, if I wanted to replace an app that I synced previously, I had to
1. Delete it from my iPhone
2. Go into the apps tab in iTunes (under my device, not the main Applications area of iTunes)
3. Check my app (it will be unchecked)
4. sync again (which includes waiting for all the other crap to sync like addresses, music, calendars...)
This is obviously an inferior process compared to just building and deploying with XCode. I'm not going to argue the benefits of which tools to use, I've built apps with all sorts of tools now. This article is focused on the developer who is already using Flash.
The other downside to syncing via iTunes is that I don't think I could have installed my app to a device that wasn't set up with my computer (say I borrowed a friend's device that's all set up with is own computer). I think I'd get a bunch of warnings about having to erase the device and sync from scratch to my computer. Now that's not going to work is it?
The good news is I discovered another way today to install apps to test on various devices that is faster and does not require syncing through iTunes - the devices can be set up for another user without conflict. You have to have provisioned the device as a testing or ad-hoc provisioning profile. Sorry if that's not familiar to you, it's beyond the scope of this article. Here's how you install your app:
1. Compile your app, signed with your dev profile. This creates your .ipa file.
2. Rename your .ipa file to .zip
3. Unzip the .zip (I've done steps 2 and 3 right in the OS X Finder)
4. Inside the folder that is created from unzipping, you'll find a .app file.
5. Open up XCode (You'll need the Apple Developer Tools to do this, available at the Apple Developer Portal).
6. In XCode, open up the Organizer (Window -> Organizer)
7. In the Organizer you should see your devices that you've set up in the Apple Developer Portal, listed on the left. Now you should be able to drag the .app file onto one of the devices on the left (which has to be plugged into your mac btw). That will install the app without an iTunes Sync. It will prompt you to overwrite the old version.
Lastly, I just want to mention that the latest version of FlashBuilder (currently named Burrito) will probably streamline this process. So, this will probably only apply to FlashBuilder/Flash/Flex SDK versions that are older than that.