This can be very confusing but I think it goes something like this. The default application launched is the version with the highest CFBundleVersion where CFBundleVersion is a monotonically increasing string, comprised of one or more period-separated integers.
In the Xcode 4 target summary CFBundleVersion is identified as "Build". In the Xcode 4 target summary CFBundleShortVersionString is identified as "Version". When a list of multiple versions of an application is presented to the user (right click on document then hover over Open With), the default application is shown first and then the remaining choices are sorted in alphabetical order by application bundle name or file name like this. AppFileName (default) (CFBundleShortVersionString) AppFileName1 (CFBundleShortVersionString) AppFileName2 (CFBundleShortVersionString) AppFileName3 (CFBundleShortVersionString) Note that the CFBundleVersion is not displayed in the list but it does determine which application is the default. Sometimes the user must log out and log back in again for this list to be updated properly after adding or installing another version of the application or after editing the application file name. When I tried it just now on Lion the list did not update properly but also required opening a document a few times by double clicking and then it did finally display properly. So in that respect it appears to be a slight regression for Lion over previous versions of Mac OS X. Multiple versions of the same application can more readily coexist and be distinguished in the file system by the user by appending some type of version identifier to application file name. This can also complement the application list described above which is presented to the user sorted in alphabetical order by the application bundle name or file name. The user of course can also change the default application for a particular document or all documents of that type in the document Get Info window. So as a developer you can help your beta testers out by always properly incrementing the CFBundleVersion and also by appending a version identifier to the application bundle name or file name if you wish. -- Richard On Nov 11, 2011, at 2:12 PM, Eric Wing wrote: > I am trying to understand how Mac (I'm running Lion) decides which version to > launch. I am puzzled because it doesn't go to the oldest, it doesn't go to > the newest, and it doesn't go to the last recently used. (If it is already > open, it always goes to the open one which is the only thing I've figured > out.) _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com