UTTypeCreatePreferredIdentifierForTag should prefer types from main bundle

Originator:kyle.sluder
Number:rdar://10288865 Date Originated:14-Oct-2011 12:35 PM
Status:Open Resolved:
Product:Mac OS X Product Version:10.7
Classification:Serious Bug Reproducible:Always
 
14-Oct-2011 12:35 PM Kyle Sluder:
Summary:

If two unrelated applications declare UTIs for the same file extension, UTTypeCreatePreferredIdentifierForTag should return the UTI declared by the current application, if one exists. Right now, it seems to always prefer the version declared by another app. Effectively, this means that if there is a UTI conflict on the system, both apps will see files with the conflicted attributes as belonging to an unreadable type.

Steps to Reproduce:

1. Open the attached demo workspace.
2. Build ConflictingUTIAppA and ConflictingUTIAppB.
2. Run ConflictingUTIAppA.
3. Quit ConflictingUTIAppA.
4. Run ConflictingUTIAppB.
5. Quit ConflictingUTIAppB.

Expected Results:

ConflictingUTIAppA outputs "UTType=com.omingroup.conflictingutiappa.filetype" to the console. ConflictingUTIAppB outputs "UTType=com.omingroup.conflictingutiappb.filetype" to the console.

Actual Results:

ConflictingUTIAppA outputs "UTType=com.omingroup.conflictingutiappb.filetype" to the console. ConflictingUTIAppB outputs "UTType=com.omingroup.conflictingutiappa.filetype" to the console.

14-Oct-2011 12:35 PM Kyle Sluder:
'ConflictingUTI.zip' was successfully uploaded

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!