On Jun 10, 2014, at 8:22 PM, Uli Kusterer <witness.of.teacht...@gmx.net> wrote:

> On 10 Jun 2014, at 21:21, Seth Willits <sli...@araelium.com> wrote:
>> - (NSString *)typeForContentsOfURL:(NSURL *)url error:(NSError **)outError;
>> {
>>      if ([url.pathExtension.lowercaseString isEqual:@"sql"]) {
>>              return @"my.uti.type";
>>      }
>>      
>>      return [super typeForContentsOfURL:url error:outError];
>> }
> 
> I suppose that this works should be mentioned in your bug. It means Apple 
> could easily fix it by making the default implementation take a first stab at 
> looking up the UTI from your Info.plist instead of from Launch Services.

I did mention this in the bug report.


I presume the default implementation may not be this way already because it's 
possible that a particular URL may be assigned a specific UTI different from 
what it may normally be, and thus Cocoa always defers to the file system to 
determine that. However I don't know if that actually ever happens, and even if 
it did, it should still look at the app's document UTIs either before asking 
the file system, or after having not found a readable type.

I'd encourage others to file a report on this topic as well.


--
Seth Willits




_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to