Skip to Content

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).



At times, iPhone developers might like to test out applications without going through the formality (or challenges) of ad hoc distribution....
 

Add a Comment

*0 / 3000 Character Maximum

5 Comments

Filter by:
Ryan

I used this, but it returns the error: "/Users/ryan/Desktop/JBapps/Cycorder.app: object file format invalid or unsuitable"
Do you know what I am doing wrong?

August 03 2009 at 10:01 PM Report abuse rate up rate down Reply
Pothik

Its not that hard to believe. From what I have heard this is going rather progressive way. I found a site - http://iphoneappcoder.com/. They work as a bridge between the entrepreneurs and app developers. You can chk this out.

July 03 2009 at 9:19 AM Report abuse rate up rate down Reply
alex

huh there were a lot more comments here earlier, is tuaw censoring stuff?? whats going on?

June 24 2009 at 11:54 PM Report abuse rate up rate down Reply
Layton Duncan

One caveat is that resigning will break access to the keychain in the app.

June 24 2009 at 10:02 PM Report abuse rate up rate down Reply
ian

Free trading of app binaries would also rapidly lead to alternative software distribution models besides the (sometimes capricious) App Store. And ways to distribute source code, thus open source iPhone apps, all without jailbreaking. Wouldn't that be nice?

June 24 2009 at 3:05 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.