Re: UTI and/or bundle-IDs with small letters
Re: UTI and/or bundle-IDs with small letters
- Subject: Re: UTI and/or bundle-IDs with small letters
- From: Thaddeus Cooper <email@hidden>
- Date: Thu, 02 Mar 2017 13:43:48 -0800
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
(email@hidden)
Sent from my iPhone
> On Mar 2, 2017, at 12:43 PM, Ben Kennedy <email@hidden> wrote:
>
>
>> On 02 Mar 2017, at 11:38 am, Daryle Walker <email@hidden> 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 (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