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?


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:


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


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


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.