Hey Sean,

Thanks for that. I am dealing with .torrent extensions. I have the UTI defined as "org.bittorrent.torrent". Both apps are using the same file format, so there shouldn't be a problem with a single UTI. It would be great if Apple included this in the OS, although is there a chance considering their stance on torrent files? It is a legitimate file format, regardless.
I'm not sure how to use the rdar links - am I missing something  
obvious? I will file a bug on Apple Bug Reporter.
Cheers,
Mitch

On Jun 12, 2009, at 4:42 PM, Sean McBride wrote:

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 (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/sean%40rogue-research.com

This email sent to s...@rogue-research.com

_______________________________________________

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

Reply via email to