MacOS link library containing CoreBluetooth framework

Solution 1:

You can just load the library by name in JNA as usual (version 5.6 or greater).

public interface CoreBluetooth extends Library {

    CoreBluetooth INSTANCE = Native.load("CoreBluetooth", CoreBluetooth.class);

    // mappings
}

You won't find it in the filesystem in macOS 11 or later, however. From the macOS Big Sur 11.0.1 Release Notes:

New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache.

JNA 5.6 was updated to use this new behavior.

That said, I do have a copy of the framework, or at least the header files, on my system under the following path:

/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/CoreBluetooth.framework/

That's not useful for loading into JNA but it does provide header files if the online documentation is insufficient. I'm not sure why you don't have it in your own Command Line tools path or how my installation differs from yours.