We are calling this the second episode of the MacGuyver Chronicles, with the first episode being a Bretford cart that we hacked to make work as a syncing station for iPad
. Bretford has since fixed that issue by releasing an iPad-specific cart, so with any luck, Apple will release a tool that allows us to do what we will list out for you in the following paragraphs (fingers crossed).
Please understand that the following directions for updating the operating system on multiple iOS devices using Xcode 4 is a fairly nerdy procedure, and we suggest that if you want to try this, please start with non-critical devices first. That is, if you are trying to send out your very first deployment, and teachers and students are waiting to use them next Monday, it's probably best to hold off on this kind of updating procedure. However, for those of you who need to update a whole slew of iOS devices to the latest OS (4.3.1 for the newest devices and 4.2.1 for older ones at the time of this blog posting), then just follow along for the ride, and things *should* work out fine.
This is presented as a major timesaver for deployments when updating large numbers of iOS devices to the latest iOS version. While not officially a "hack," it is a less-than-elegant procedure that works and it works well. We are not hardcore developers or hackers, but we have been able to use this tool to at least get the updates flowing more efficiently than the current iTunes one-at-a-time approach. We understand that iOS, iTunes, and all this update nonsense is to simplify the process for the millions of consumers who buy and use the products, but we still long for a tool that is tailored to mass deployments such as ours. We don't believe we are alone. Until then, we can use the various tools Apple (and others) have provided us to continue our trek.
Please understand that we are not gurus in the use of Xcode, nor in the development environment as a whole. We are using one small part of Xcode (Organizer) and probably can't answer most of the other questions that might come up along the way.
[We've since upgraded to Xcode 4.2 and use Lion on our Mac to make this work with iOS 5]
So, for those of you ready to play along at home, make sure you have the following:
- Xcode 4 (now at vers. 4.0.1), downloaded and installed on your 10.6.x Mac (we are using 10.6.7, YMMV with other OS versions)
- Xcode 4 is now 5 bucks at the Mac App Store if you are not a developer. It's worth the money.
- Multiple iOS devices ready for updating
- Locate the package on your machine with the latest iOS update (4.3.1 for the newest devices and 4.2.1 for older ones at the time of this writing)
- If you can't easily locate the updater files on your local drive, or simply need a version you've not yet downloaded through iTunes, you can often find those files on this site's list: http://ios.e-lite.org
- Patience, and an understanding that this only does the iOS update, not the restore from backup procedure which brings back your settings, apps, and content from a "master iOS device"
- Backups of all the devices you are going to update as they will be set back to the factory settings, will need to be activated in iTunes, and will need to have their settings restored and synced for content and apps to be replaced
Overview of the procedure:
- Collect iOS updater files for Xcode to use
- "Register" the devices in Xcode Organizer and set them up to use them for development
- Select the iOS firmware for each device, begin the restore process
- Activate the devices in iTunes, restore settings from the backups, sync the apps and content
- Rinse, repeat
Detailed procedure: Collect iOS updater files and register the devices in Xcode Organizer and set them up to use them for development
Click for full-size image
Launch Xcode, and after the main window appears, simply choose "Organizer" from the Window menu (shift-⌘-2). The screenshot to the right shows you that there are no devices in my list (like opening it for the first time). Don't worry if you don't have anything in the profiles. The first thing we'll need to do is help Xcode locate the updater files. We've placed them on the Desktop for this demo, but somewhere more organized and a place that you'll always keep them (in a separate folder all together) would be better. That way, Xcode will always know where to find the files you want to use. Make sure you have "Devices" selected in the main bar, and then select "Software Images" in the left pane.
Locate the updater files on your local drive and drag them into the window, Xcode will then add them to the list of available iOS options for your devices. You can have as many as you like in there. Because we have different levels of devices, we've added several updaters (i.e. 2nd gen iPod touches only go to 4.2.1). Again, a helpful list of iOS updates has been found on http://ios.e-lite.org
You can always, of course, use the ones that iTunes downloads for you, located in ~/Library/iTunes/iPod Software Updates/ on your machine. You'll know you are using the right files when they look like this:
Click for full-size image
Now, connect your devices to your machine, and they will begin to appear in the left pane. If Xcode prompts you to collect debugging information, go ahead and allow that.
However, you must make sure that you are NOT logged into the developer account (you can just cancel that dialog box when it appears) because dev accounts have a limit of 100 total devices for the year- that's only 3 classrooms! You don't need the connection to the developer program to make this work.
We used three iPod devices here, two 2nd gen iPod touches, which will only update to 4.2.1, and one 4th gen iPod touch currently on 4.2.1 which we will update to 4.3.1. As the devices appear, click on the button that says "Use for Development." Xcode will collect information on that device and prepare it to be updated by Xcode.
Go ahead and click that button for all the devices you have connected. Xcode can work on all of them simultaneously, so you don't need to wait for one-at-a-time. You're not in iTunes anymore, Toto. It is this ability of Xcode that we will employ to update all the firmware on all the devices at the same time, as well.
Detailed procedure: Select the iOS firmware for each device, begin the restore process
When Xcode is ready to restore the firmware on your devices, you'll see the Software Version number that is currently installed on your device. Use that drop-down menu to select which one you'd like to install.
Since this iPod touch (Fernando) has 3.1.2 installed, it is checked in the drop down, but the others that are available for this device show as well. We will choose 4.2.1 for this iPod touch. Notice that 4.3.1 is not showing, as this device does not support it.
For the iPod touch 4th gen, we can install the 4.3.1, so we've selected that one here, and are ready to install. You can select your "Software Versions" of each device, click on "Restore iPod" and move on down the list in the left pane and do all of them. They will work in parallel, alerting you when they are done. You can do this with two or three or twenty or thirty. Pretty slick.
The window looks like this when it's working:
Click for full-size image
Believe it or not, that's all there is to it to install the iOS versions onto all of the devices you have connected at the same time. Now it's time to get them back to normal to use. Just on the off chance you don't believe us, here are two that are updating their firmware simultaneously on the same machine:
Detailed procedure: Activate the devices in iTunes, restore settings from the backups, sync the apps and content
Click for full-size image
Now on to the part you already know... you will need to activate the iOS devices via iTunes, and then restore from backup
and sync again in order to replace the apps and content.
We haven't gotten to that yet, so for now, we will depend upon our regular pattern of restore from backups, found here
Detailed procedure: Rinse, repeat
You've got iPods and iPads you should be updating... don't you? Get cracking! We hope this helps you in your work to deploy these magical devices in your educational kingdom.
The following command (run from Terminal) will clear out the list of devices that will build up in Xcode Organizer as it processes devices:
For Xcode 4, it's:
/usr/libexec/PlistBuddy -c 'delete :DVTSavediPhoneDevices' ~/Library/Preferences/com.apple.dt.Xcode.plist
For Xcode 3.x, it's:
/usr/libexec/PlistBuddy -c 'delete :XCKnownRemoteComputers' ~/Library/Preferences/com.apple.Xcode.plist