Tuesday, July 7, 2009

application sharing for the iPhone simulator

Last week, TUAW showed you how to sign iPhone applications for informal developer-to-developer distribution. That approach lets you share applications between members of the iPhone developer program by using your signing credentials to authorize the application for use on your development units. iPhone applications compiled for the Intel-based simulator can also be shared between developers. And, since the free developer program offers access to the simulator, the apps can be distributed even more widely than with the re-signing approach.
Simulator testing does not offer the full suite of device-specific capabilities. You cannot simulate the onboard camera or retrieve proper accelerometer feedback. The simulator does not vibrate or provide general multitouch input. (You can pinch, but that's about it.)
The strength of simulator-based distribution is that it lets you send out applications for early testing and feedback. Sim-only tests strengthen the preliminary design process; this approach helps solicit feedback on user interface and general program layout before the main development push gets underway.
Simulator-based apps are easy to transfer and easy to use, cutting out a layer of overhead that's needed for when you go to a full ad-hoc beta.
To distribute a simulator application, go to the Library/Application Support/iPhone Simulator/User/Applications/ folder in your home directory. There you'll find the application sandbox folders that are currently installed for your simulator. Each folder is named with a unique id (i.e. 56E66CE5...DC028F) that does not reflect the folder's contents.
You'll have to peek inside to determine which folder is which.The folder contains the application, and three sandbox directories: tmp, Library, and Documents.
To share a simulator folder compiled for 2.2.1 and earlier, you must zip up both the folder with the application and the .sb (sandbox) file that shares the same name as the folder. 3.0 and later applications do not use a .sb file. Just zip up and share the folder.
Install the shared app by decompressing its sandbox folder (and, for 2.x, its .sb file). The recipient must have installed the iPhone SDK. Drop it into the simulator's Applications folder on another machine and launch the simulator. The app should appear in the simulator, ready for testing.

No comments: