The Apple documentation is pretty good about describing how to determine if two 
UTIs are equal. See the documentation here:

<https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/understanding_utis/understand_utis.tasks/understand_utis_tasks.html#//apple_ref/doc/uid/TP40001319-CH203-BABHCIAC>

Specifically the section titled "Testing for Equality and Conformance."

Hope this helps. 

--Thaddeus O. Cooper
(tcoo...@nomoreboxes.com)

Sent from my iPhone

> On Mar 2, 2017, at 12:43 PM, Ben Kennedy <b...@zygoat.ca> wrote:
> 
> 
>> On 02 Mar 2017, at 11:38 am, Daryle Walker <dary...@mac.com> wrote:
>> 
>> Turns out that the system gives me the UTI in all small letters, so my 
>> (Swift) “switch” fails and my no-matching-type code is executed. I know I 
>> could switch my bundle ID to all small letters, but I want to know first if 
>> this is documented? Or is the small-letters transformation a bug?
> 
> I'm surprised that I can't find any Apple documentation that discusses 
> case-sensitivity with respect to UTIs. Surely the answer is prescribed 
> somewhere, and the omission from the dev guides is an oversight.
> 
> In any case, I found this thread from a couple of years ago: 
> https://lists.apple.com/archives/cocoa-dev/2015/Apr/msg00214.html
> 
> Therein, Sean McBride and Ken Thomases suggest using either 
> UTTypeConformsTo() or -[NSWorkspace type:conformsToType:] to test a UTI, 
> rather than a string comparison.
> 
> b
> 
> 
> _______________________________________________
> 
> 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/tcooper%40nomoreboxes.com
> 
> This email sent to tcoo...@nomoreboxes.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to