pyobjc-framework-intentsui provides Python wrappers for Apple's IntentsUI framework on macOS. It is part of the PyObjC project, a bidirectional bridge enabling Python scripts to interact with Objective-C libraries, including macOS Cocoa frameworks. The current version is 12.1 and it maintains an active release cadence, typically aligning with macOS SDK updates and Python version support.
pip install pyobjc-framework-intentsuiVerified import paths — ran on the pinned version, not inferred.
The IntentsUI framework classes, such as `INUIAddVoiceShortcutViewController`, are designed for building UI within SiriKit Intents UI extensions. A direct, standalone Python quickstart without a full macOS application and Xcode project setup is not practical for demonstrating functional UI. This snippet shows a basic import and explains the typical context of usage.
Upgrade your Python environment to Python 3.10 or later for PyObjC 12.x. Always check `requires_python` on PyPI or the PyObjC changelog for specific version requirements.
Review code that interacts with object initialization, especially custom subclasses or factory methods, to ensure correct reference handling. Explicit memory management is rarely needed in Python, but understanding the underlying Objective-C semantics is crucial for correct behavior.
Only use `pyobjc-framework-intentsui` in macOS environments. For cross-platform solutions, consider alternative libraries.
Always check for `None` before calling methods on PyObjC-wrapped objects that might originate from Objective-C `nil` values. E.g., `if my_obj is not None: my_obj.doSomething_()`.
Favor `MyClass(...)` for new object creation when possible, or `MyClass.alloc().init...()`. If subclassing and overriding `__new__`, ensure `__init__` logic is compatible with the PyObjC bridging rules and refer to the PyObjC instantiation documentation.
If using Python 3.13's free-threading, proceed with caution and thorough testing, as the feature is still experimental in Python. Ensure you are using PyObjC 12.1 or newer for free-threading support.