Archive for May 18th, 2009

18
May

Tip: Multiple keychains

As you’re quite undoubtedly aware if you work for more than one client, the process of switching signing identities to select the correct provisioning profile is … non-optimal, shall we say? Our current “solution” actually involves manually deleting all except the currently in use certificate from the login keychain so Xcode doesn’t descend into hopelessly gibbering confusion by actually having more than one distribution option available. And Ad Hoc … well, we just don’t even try that on our development machine anymore.

But ho! Here’s some instructions from an obviously very clever fellow who’s sorted out how to set up individual client keychains with the appropriate certs and keys for each portal you’re involved with. The main trick it seems for getting from what ought to work to what actually works without having to completely wipe your phone and restart while flailing at it is knowing that the only tool that apparently is any good is managing this stuff isĀ iPhone Configuration Utility from Apple, so you should use it for all your profile work, and just make iTunes and Xcode shut up and stay out of the way while the grownups sort things out!

[EDIT: But watch out for some versioning issues with the device communication frameworks; if you've installed a 3.0 beta SDK and then install iPCU, you'll have to reinstall the beta SDK -- not the 2.2.1 release! -- before iTunes/Xcode will see your devices again. Whoops!]

[EDIT: And here is a useful wiki for your clients which includes instructions for the team agent to create and mail you the distribution profile and certificate. A useful place to point them at, indeed!]

[EDIT: And here's a tip for a script to add to set the keychain to what you want for a project:

#!/bin/sh
/usr/bin/osascript - <<***
tell application "Keychain Scripting"
set current keychain to keychain named "mike.keychain"
end tell
***

Yes, never forget that AppleScript is usable from the command line!]