Registry / communication / pyobjc-framework-iobluetooth

pyobjc-framework-iobluetooth

JSON →
library12.2pypypiunverified

PyObjC Framework IOBluetooth is a Python binding for the IOBluetooth framework on macOS. It enables Python applications to interact with Bluetooth devices and services through Objective-C APIs. The library is currently at version 12.1 and typically releases new versions in conjunction with macOS SDK updates and PyObjC core developments, ensuring compatibility with the latest Apple technologies.

pip install pyobjc-framework-iobluetooth
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-I
P
pyobjc-framework-iobluetooth
communicationpythonv12.2
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
build_error
glibc
py 3.10–3.920 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IOBluetooth
✓ import IOBluetooth
The primary module for accessing IOBluetooth framework functionality.
objc
✓ import objc
The underlying PyObjC bridge module, often needed for advanced interactions or to use PyObjC utilities like `objc.ObjCLazyModule`.
NSObject, NSBundle
✓ from Foundation import NSObject, NSBundle
Common base classes and utilities from the Foundation framework, frequently used when working with any Objective-C framework.

This quickstart demonstrates how to import the `IOBluetooth` framework using PyObjC and perform a basic check by accessing a class (`IOBluetoothDevice`) and its associated bundle. This confirms the successful loading and accessibility of the Objective-C framework through Python. For more in-depth usage, refer to Apple's IOBluetooth documentation.

import objc from Foundation import NSBundle import IOBluetooth # Verify that the IOBluetooth framework is loaded and accessible print(f"IOBluetooth module loaded: {IOBluetooth is not None}") if IOBluetooth is not None: # Access a common class from the IOBluetooth framework, e.g., IOBluetoothDevice # and try to get its bundle identifier to confirm functionality. device_class = IOBluetooth.IOBluetoothDevice if device_class: print(f"Successfully accessed IOBluetoothDevice class: {device_class}") # Get the bundle for the class to show a more concrete interaction bundle = NSBundle.bundleForClass_(device_class) if bundle: print(f"IOBluetooth bundle identifier: {bundle.bundleIdentifier()}") else: print("Could not retrieve bundle for IOBluetoothDevice class.") else: print("Failed to access IOBluetoothDevice class.")
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9. Users on Python 3.9 must use an older version of pyobjc-framework-iobluetooth (or the full pyobjc package).
fix
Upgrade to Python 3.10 or newer, or pin `pyobjc-framework-iobluetooth<12.0`.
affects: >=12.0
breakingPyObjC 11.0 dropped support for Python 3.8. Users on Python 3.8 must use an older version of pyobjc-framework-iobluetooth (or the full pyobjc package).
fix
Upgrade to Python 3.9 or newer, or pin `pyobjc-framework-iobluetooth<11.0`.
affects: >=11.0
breakingVersion 11.1 changed how initializer methods (methods in the 'init' family) handle references, aligning with `clang`'s Automatic Reference Counting (ARC) documentation. This means `init` methods now steal a reference to `self` and return a new one, which can alter object lifecycle management.
fix
Review code interacting with Objective-C `init` methods for potential reference counting issues and adjust accordingly.
affects: >=11.1
gotchaPyObjC is a macOS-specific bridge. `pyobjc-framework-iobluetooth` will only function on macOS and cannot be used on other operating systems.
fix
Ensure deployment environment is macOS. Use cross-platform alternatives for Bluetooth interaction if multi-OS support is required.
affects: All versions
gotchaChanges in `__init__` and `__new__` behavior in versions 10.3 and 10.3.1 can cause issues. While `__init__` was initially disabled when PyObjC provided `__new__` (v10.3), it was re-enabled for user-implemented `__new__` (v10.3.1). This interaction can be tricky for custom class creation patterns.
fix
If defining custom `__new__` or `__init__` for Objective-C classes, thoroughly test object initialization and lifecycle. Consider moving complex initialization logic to Objective-C methods if encountering issues.
affects: >=10.3, <11.1
gotchaInstalling PyObjC and its framework bindings may require Apple's Xcode Command Line Tools to be installed, especially for certain Python versions or environments.
fix
Run `xcode-select --install` in the terminal to ensure Command Line Tools are present before installation.
affects: All versions
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredThe core bridge between Python and Objective-C, required for any PyObjC framework binding.
pyobjc-framework-cocoaoptionalOften implicitly or explicitly required for a full Cocoa application context, as IOBluetooth frequently interacts with Cocoa fundamentals.
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
pyobjc-framework-iobluetooth — pip install pyobjc-framework-iobluetooth · libregistry