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: Ben Kennedy <email@hidden>
- Date: Thu, 02 Mar 2017 12:43:13 -0800
> 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