markjnet

Ad Hoc Distribution to Windows and Mac – zipping the build

There’s a handy distribution tool for iPhone developers doing beta testing called ‘ad hoc distribution’. With ad hoc distribution a developer can make a special build of an iPhone app that can be installed on testers iPhones and iPods before the app hits the app store. It’s tricky to get working and your testers have to do a bit of work too, but it’s worth the effort. Developers: just keep trying to follow Apple’s instructions until you get it to work on your own device.

When you send the app out to testers, they need to drag and drop it into iTunes to get it on their phone, and this can easily go wrong for Windows users. In OS X when you compress your ad hoc build, you just do this right?

screen-12

On OS X that creates a zip file that includes a resource fork, which is extra stuff that’s not needed in this case. When the zip arrives on your tester’s windows laptop that Mac resource fork just looks like a normal folder to Windows, and it can prevent iTunes on Windows from recognizing the folder as an app… leaving your windows tester baffled as to why they can’t just drag and drop the file into iTunes as you instructed them to.

If they unzip with a windows right click->uncompress file they get this:

cm-capture-11

And you tell your users to drag and drop CallingCard1.app into iTunes, but look inside that folder:

cm-capture-3

__MACOSX is the resource fork thing, and it’s going to confuse poor iTunes on Windows so iTunes ignores the drag and drop, and your testers won’t be able to install. Your testers need the app folder inside the app folder. Confusing! If they unzip with WinZip they are in more luck, because it unzips the content to the current folder and gives them the right app folder right away.

You can save all this trouble though, but making a zip archive in the first place that doesn’t have the Mac resource fork.  BetterZip is a handy Mac app that will do this for you. That preferences setting ‘Remove Mac specific stuff from archives’ keeps __MACOSX out of the zip, and the resulting zip will install on Mac and Windows. Another way to do this is to unzip in windows yourself, find the correct app folder, and re-zip.

screen-2

You can do the re-zip method in windows running in Parallels on your Mac, but it can go horribly wrong. A typical Parallels setup shares the OS X desktop folder as the Windows desktop folder so that your Windows and Mac desktops are one and the same. If you unzip and re-zip in Windows on a shared Mac desktop, then the zip archive will still be messed up. So if you are doing this, do everything in a normal (in the parallels virtual drive) Windows folder.

Finally, good luck, ad-hoc is super tricky.

[Slashdot] [Digg] [del.icio.us] [StumbleUpon]

Comments

5 Responses to “Ad Hoc Distribution to Windows and Mac – zipping the build”
  1. Matthias says:

    Why shouldn’t I just use: zip -r on the command line?

  2. yan says:

    i find it easier to send windows people a .ipa file from Music/iTunes/Mobile Applications/ directory. that worked out better for most of my non-mac beta testers for some reason.

  3. Matt West says:

    Does this file/folder layout still hold true today (October 2009) ?

    I am currently investigating a problem one of my beta testers has encountered in Windows – iTunes is saying the ’signer is invalid’. For all the other testers it works fine (on Macs). I have fired up my old laptop PC, downloaded my adhoc zip and found that there is resource fork folder you mention but no second “.app” folder inside the first “.app” folder.

    I really hope this awkward huddle has gone away.

    Thanks
    Matt.

Trackbacks

Check out what others are saying about this post...
  1. [...] Ad-hoc zip file for Windows users. Apparently it can’t be created with the Compress option in finder because it puts extra [...]

  2. [...] Ad Hoc Distribution to Windows and Mac Informative post about how to use an Ad Hoc Distribution build to allow people to test your iPhone app before it goes up on the iTunes App Store. [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

  • Categories

  • markjnet