PyObjC-framework-AudioVideoBridging provides Python wrappers for Apple's AudioVideoBridging framework on macOS, enabling Python applications to interact with AVB-capable hardware and software. It is part of the larger PyObjC bridge, which allows full-featured Cocoa applications to be written in pure Python. The library actively maintains compatibility with the latest macOS SDKs and Python versions, typically releasing updates in sync with new macOS releases.
pip install pyobjc-framework-audiovideobridgingVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import the AudioVideoBridging framework and access a fundamental class, `AVBManager`. PyObjC framework wrappers provide direct access to Objective-C classes and methods. Note that PyObjC itself does not include documentation for the wrapped macOS APIs; developers should consult Apple's official AudioVideoBridging documentation for detailed usage of the framework's classes and functions.
Upgrade Python to 3.10 or later, or pin PyObjC to a compatible older version.
Review code involving Objective-C initializer methods and `alloc().init()` patterns, ensuring correct object lifecycle management. PyObjC 10.3 introduced `SomeClass(...)` as a more Pythonic alternative to `SomeClass.alloc().init()`.
Upgrade to PyObjC 10.3.1 or later to restore `__init__` functionality when `__new__` is user-implemented. Avoid relying on `__init__` for classes using the PyObjC-provided `__new__`.
Migrate away from the `IMServicePlugIn` framework; find alternative APIs provided by Apple for modern macOS versions.
Ensure that if Objective-C code holds weak references to Python objects, the Python objects (or their Objective-C proxies) are explicitly kept alive for the necessary duration. For objects used in views like `NSOutlineView`, it's generally safer to use Python subclasses of `NSObject`.
Be aware that KVO will not function for Python subclasses of `NSProxy`. If KVO behavior is required, consider alternative implementation patterns or subclassing a different Objective-C class if applicable.