Some time ago, I embarked on a binding library for the macOS IOBluetooth framework. This provides functionality for classic Bluetooth, Hands-free and Object Exchange functionality. It was built for Xamarin Mac and needed a big overhaul to support newer .NET versions.

Today I’ve release a pre-release package for version 1.2. This is build with .NET 9.0 and 10.0. It has gone through a number of changes, to improve the API and its documentation. It is not complete, and there may be further renaming required which is why I’ve marked this release as a preview. At the moment the hands-free and Obex functionality are largely untested.

Generally all elements are renamed to follow .NET conventions. Like the in-box .NET framework wrappers the class names have the IOBluetooth prefix stripped and all sit in the IOBluetooth namespace. The only exception is IOBluetoothDevice is called BluetoothDevice because Device seemed a bit too generic.

I’ve now completed a definition of the IOReturn enumeration which represents all the possible return values from various low-level API calls. IOBluetooth uses these on a number of methods and delegates so this makes it easier to identify meaningful error codes rather than the raw numbers.

There is also the IOBluetoothUI companion library for a UI device picker etc.

I’m always open to suggestions so please get involved in the GitHub project if you have feedback/suggestions/issues.

Peter Foot Avatar

Published by

Categories: , ,

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.