Re: UTI not identified correctly for some users.
Re: UTI not identified correctly for some users.
- Subject: Re: UTI not identified correctly for some users.
- From: "Sean McBride" <email@hidden>
- Date: Fri, 12 Jun 2009 13:42:25 -0700
- Organization: Rogue Research Inc.
Mitchell,
Welcome to the wonderful world of file extensions! :)
A file has one and only one UTI. The system (Launch Services aka LS)
decides on a UTI based on the file's extension and HFS type (and MIME
type?). So if two apps declare different UTIs that refer to the same
extension, LS will pick one of them. This is happening to you.
What extension are you dealing with? Is it actually the same file
format that both apps are using? If so, confer with the other developer
and make sure you both have the same UTI declaration. Then file a bug
asking Apple to include it in the OS. If it's a different format but
both have conflicting extensions, you are mostly out of luck. HFS types
won't help either because LS always prioritizes extensions, even when
they conflict.
Do file bug(s); dupes increase priority. You may reference mine:
<rdar://5540833> <rdar://5997350>.
Cheers,
Sean
On 6/11/09 7:19 PM, Mitchell Livingston said:
>As a followup to this, it appears that the users having problems do
>have a different app set for this file type, so it's not recognizing
>my UTI name for NSOpenPanel's setRequiredType: and NSWorkspace's
>typeOfFile:... Is there a way around this besides specifying the file
>extension explicitly? Should this be reported to Apple?
>
>Cheers,
>Mitch
>
>On Jun 11, 2009, at 6:46 PM, Mitchell Livingston wrote:
>
>> I have created an UTI in my app's Info.plist. For open panels,
>> adding files, etc. I use this (or check [[[NSWorkspace
>> sharedWorkspace] typeOfFile: file error: NULL]
>> isEqualToString: ...]). This works fine for me, but this is failing
>> for the proper file type for some users. Perhaps the system doesn't
>> properly register the UTI for these users, or perhaps another app
>> registers a different UTI name for the same file extension. Is there
>> something I can do to get around this, besides not using UTI's?
>>
>> Cheers,
>> Mitch
>
>_______________________________________________
>
>Cocoa-dev mailing list (email@hidden)
>
>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:
>
>This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden