pyobjc-framework-iobluetoothui provides Python wrappers for Apple's IOBluetoothUI.framework on macOS, allowing Python applications to interact with Bluetooth-related user interface components. It is part of the larger PyObjC project, which bridges Python and the Objective-C runtime. The current version is 12.1, with releases typically tied to new macOS SDKs and Python version support cycles.
pip install pyobjc-framework-iobluetoothuiVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes a macOS Cocoa application, sets up a simple delegate, and then displays the IOBluetoothServiceBrowserController as a modal dialog. The application will wait for the user to dismiss the Bluetooth browser before terminating. This demonstrates how to interact with a core UI component from the IOBluetoothUI framework.
Ensure your Python environment meets the minimum version requirement for the PyObjC version you are installing. Upgrade Python if necessary.
Review code involving custom `alloc`-`init` patterns or manual reference counting with older PyObjC versions. Adapt to the correct ARC semantics, particularly for methods returning newly allocated objects.
If defining custom Objective-C classes in Python, use the `alloc().init()` pattern or a custom `__new__` method to ensure proper object initialization. Be aware of the specific `__init__` limitations when using PyObjC's default `__new__`.
If targeting Python 3.13, avoid relying on its experimental free-threading features when using PyObjC. Monitor PyObjC release notes for explicit free-threading support.
When upgrading PyObjC or targeting newer macOS versions, verify that all required frameworks still have bindings available. Update application logic to use modern APIs if a framework has been removed or deprecated by Apple.