Search code examples
macos-carbon

How to import Carbon/HIToolbox into objective c program?


I'm new to Objective-C and I'm trying to use methods from TextInputSources so I tried

#import <Carbon/HIToolbox>

and

#import <HIToolbox/TextInputSources.h>

nothing of those works. Is there something I'm missing? I'm using Xcode 3.


Solution

  • #include <Carbon/Carbon.h>
    

    It's a big header, but it always works.

    You should probably do this in your prefix header, simply because including it anywhere else is going to slow down builds by a lot.