Default program dropdown in preferences – where is this list retrieved from? Most OS X programs have a ''default program'' dropdown list in their preferences. For example, here's what I see in Mail.app:



From where is this list retrieved? How does each application know what other similar applications are available on the same computer?
lsregister, found in /System/L*/Fr*/CoreS*/V*/A/F*/L*/V*/A/S*/ manages this list by looking in the Info.plist of all the apps on the system. Apps register themselves as being able to action certain files (such as Mail registering .eml) or protocols (such as mailto: which is also registered by Mail) and lsregister makes a note of this.

For more information about Uniform Type Identifiers, see:


https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html