Is it okay to use carbon api's that works on 64-bit macOS

334 Views Asked by At

It seems that from macOS Catalina all 32-bit applications won't work and the carbon framework will be unsupported. What about the carbon apis that work on 64-bit arch? For Example, we have been using TIS (Text Input Source Services) to get the keyboard layout in our application. We need to import carbon framework for this to work.

Sample code:

TISInputSourceRef source = TISCopyCurrentKeyboardInputSource();
NSLog(@"languages: %@", TISGetInputSourceProperty(source,  kTISPropertyInputSourceLanguages));
NSLog(@"localized name: %@", TISGetInputSourceProperty(source, kTISPropertyLocalizedName));

Will this code work on MacOS Catalina?

Thanks in advance!

1

There are 1 best solutions below

0
jvarela On BEST ANSWER

TIS has been 64-bit for a long time. I use it in my application which is 64-bit too and Catalina-ready. The only parts of the Carbon.framework that do not have a 64-bit counterpart are those related to the Carbon UI. So, you should be OK.