I have the following test code:
import Cocoa
import Carbon
let x = kUCKeyActionDisplay
In Xcode 6.2 there is no problem, but in Xcode 6.3 this code throws an error.
The error message is: Use of unresolved identifier 'kUCKeyActionDisplay'
.
Why can't I access the UnicodeUtilities
namespace?
It is no longer available in Swift for some reason, according to the OSX 10.10.3 API documents.
You can however still access them in Objective-C, in the same way (i.e. @import CoreServices;
)
I've just written the code that needs them in Objective-C - you could of course create a wrapper.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With