Bluetooth on Lazarus / FreePascal on Mac OS X

Has anyone used Bluetooth on Mac OS X with Lazarus or FreePascal? There is a bluetooth unit, but currently it only supports Linux.

Information about the existing unit: http://wiki.freepascal.org/Bluetooth

I plan to improve this to support Mac OS, but it would be nice to find out if anyone wrote any code to use BlueTooth on Mac OS to avoid duplication of work.

On the other hand, if you used Xcode to access Bluetooth, which libraries did you use? I'm sure I can detect this with the Xcode profiler by opening some Bluetooth applications.

Note. Mac OS X doesn't seem to use the BlueZ library that Linux has, so I don't think the solution is as simple as changing the library path. Instead, it has an IOBluetooth "Framework" located in /System/Library/Frameworks/IOBluetooth.framework.

After looking, it looks like this:

    kaikei.ocn.ntt.com:IOBluetooth.framework $ file *
    CodeResources: XML document text
    Headers: directory
    IOBluetooth: Mach-O universal binary with 3 architectures
    IOBluetooth (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
    IOBluetooth (for architecture i386): Mach-O dynamically linked shared library i386
    IOBluetooth (for architecture ppc7400): Mach-O dynamically linked shared library ppc
    Resources: directory
    Versions: directory

, , - , , , Google... , , .

: (, sqlite3), "". MacOS Bluetooth FreePascal, FreePascal. ( , , C, Obj-C, , Obj-C FPK, , , ).

+3
1

svn Mac OS X C http://svn.freepascal.org/svn/macosxintf/trunk

FPC , . , ( MPPInterfaces) , FPC, GPC CodeWarrior Pascal.

FPC, "make fpcpinterfaces" Build/FPCPinterfaces.

, - macosxintf:    ./Scripts/Convert.pl/System/Library/Frameworks/IOBluetooth.framework/Headers/IOBluetooth.h FORCE MPPInterfaces

, / , . bugs.freepascal.org .

( : , URL- , URL- , )

Mac Pascal (lists.sonic.net/mailman/listinfo/mac-pascal) , -, .

Bluetooth Objective-C. Objective-Pascal SFS FPC, FPC wiki (google FPC_PasCocoa). Objective-C.

Objective-C, , script FPC svn (svn.freepascal.org/svn/fpc/trunk/packages/cocoaint/utils/)

, Mac Pascal, , , .

+3

Source: https://habr.com/ru/post/1722660/


All Articles