UTI and/or bundle-IDs with small letters
UTI and/or bundle-IDs with small letters
- Subject: UTI and/or bundle-IDs with small letters
- From: Daryle Walker <email@hidden>
- Date: Thu, 02 Mar 2017 14:38:16 -0500
I’m trying out my document-based Mac app’s data-read routine, and the code it being skipped. I actually check the typeName (i.e. the UTI) and it doesn’t match. My bundle identifier for the app has capital letters. I base my document’s main type off that identifier, so it also has capital letters. 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?
BTW, I looked at the TextEdit sample code, and it uses the type conformance methods instead of an exact string match. Should I be doing that instead? (Although that means no more “switch” statement.)
—
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com
_______________________________________________
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