Skip to Content

Free TUAW iPhone app -- try it now!
AOL Tech

code signing posts

Filed under: iPod Family, Developer, iPhone

Dev Corner: Signing iPhone apps for informal distribution

At times, iPhone developers might like to test out applications without going through the formality (or challenges) of ad hoc distribution. Ad hoc distribution was introduced by Apple to allow software testing on up to 100 registered devices. It is, admittedly, a bit of a pain.

Developers must collect device information (the "UDID", aka their unique device identifiers), register that device at the iPhone developer portal, create an special provisioning certificate, add a special entitlement, and build an ad-hoc only version of their software to distribute along with that certificate.

If all that seems like a hassle, well, yes it is. It is, however, the proper, authorized, and recommended way to distribute pre-release software, whether for testing or reviews. But there is another way.

If you know for sure that your target audience is another developer, the process becomes way easier. You can simply compile a normal development build of your application and send a copy of that build to another developer.

That's because each registered developer has the ability to sign applications. Although the app was built to work with just the in-house devices you've registered for development, another developer can re-sign that application using the simple command-line script shown here.

#! /bin/bash 
export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform\
/Developer/usr/bin/codesign_allocate

codesign -f -s "iPhone Developer" $1.app

This script uses Xcode's codesign utility to sign the already compiled version of the application. Once applied, you can then install the application through Xcode.

So is this a general distribution solution? No. And thank heavens for that; free trading of app binaries would rapidly lead to piracy. This approach allows developer-to-developer testing and collaboration only. The development signing is limited to the units you have personally registered.

If you want to try this out, follow the link at the start of this post. It leads to a testing folder I keep around and occasionally stock with software that I need tested. It also includes a copy of the script, which you must make executable (chmod 755 signit).

Filed under: Developer, iPhone

Rogue Amoeba on code signing, iPhone SDK

Mike Ash at Rogue Amoeba has published his fairly extensive thoughts on Apple's code signing policies and plans, as well as how they relate to the iPhone SDK. He makes some solid points and elaborates on thoughts that are being bandied about elsewhere on the 'net. In his critique of some points in the iPhone SDK announcement, his concerns regarding the "banned" iPhone apps are quite valid, in my opinion. Out of the list of apps to be denied (illegal, malicious, unforeseen, privacy, porn and bandwidth hog), he picks out a couple that are of concern.

In regards to the issue of "porn", he notes that "...Apple is making moral judgements of the apps they sign." To me, it seems like Apple chose the safe option and just categorically denied materials that could sully their reputation, which I personally think was a good (if not obvious) choice. But the question arises, as it always does, about the definition of porn and obscenity... and who makes the call. Apple, as gatekeeper, gets to make those decisions for all of us. I can see some torrid debates arising in the future.

Also of particular (and potentially more controversial) concern is the category "unforeseen," which provides a fairly broad scope for Apple to add to the list later. Again, it's likely a smart decision on Apple's part and a good way of sealing off loopholes without making the list read like a legal contract (see "License Agreement"), but leaves open the option for some heavy-handed control over what you can put on your iPhone.

Of course, this initial list is incomplete, with restrictions outlined in the SDK license agreement (as pointed out in Rogue Amoeba's subsequent post). If you take an interest in this debate, be sure to check out Mike's post, "Code Signing and You."

Tip of the Day

Holding the Command key (aka the Apple key) and pressing Tab will cycle through your open applications. It's easier to Cmd-Tab if you are Copy (Cmd-C) and Pasting (Cmd-V) to and from various applications.


Follow us on Twitter!
 TUAW [Cafepress]

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
Storyist 2.0
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor

 

More Apple Analysis

AOL Radio TUAW on Stitcher