tags:

views:

120

answers:

3

I distributed an iPhone application to some testers who are using Windows. On their machines, the application that I built (in the form of an .app bundle) appeared as a directory. That makes sense because a .app bundle is actually a directory.

What mechanism does Mac OS X use to display these bundles as files within Finder? Is there anyway to get the same kind of abstraction on Windows?

+3  A: 

It's kind of the same magic that lets zip files appear as "compressed folders". It's what the shell does but I am afraid you have no way of hooking into such things.

Joey
Actually, there is no magic, and you can hook into this; if you want to create a "file" type that is actually a folder, you set LSTypeIsPackage to true in its description (in CFBundleDocumentTypes in the Info.plist of your Mac app). If you just want to mark an individual folder, use SetFile -a B foldername.
oefe
Well, with the "no way" I was more talking about Windows. I don't know enough about OS X for that :-)
Joey
+5  A: 

No, but why would you want to? An .app on Mac is not equivalent to an .exe on Windows - if you explore the .app bundle on a Mac (using "Show Package Contents"), you'll see an actual executable program inside. This program is more the equivalent of a Windows .exe, and you can liken the entire .app bundle to the Program Files directory for an application on Windows. All the .app serves to do is to concentrate program resources in one directory, much like an install directory does on Windows.

Tim
+1  A: 

If you are distributing to Windows users all will go much better if you give them IPA files instead of app bundles.

The easiest way to create an IPA file is to drag the .app bundle into iTunes, and then look for the IPA file that it generates for you.

Kendall Helmstetter Gelner