Registry /
auth-security / pyobjc-framework-securityui
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
muslpy 3.10–3.940 runs
build_error
glibcpy 3.10–3.940 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SFAuthorization
✓ from SecurityUI import SFAuthorization
Commonly used class for managing authorization rights and UI.
This quickstart demonstrates how to verify the presence of the SecurityUI framework and successfully import a key class (`SFAuthorization`). It confirms the Python bindings are correctly installed and accessible on a macOS system without requiring a full GUI application.
from Foundation import NSBundle
from SecurityUI import SFAuthorization
# This example verifies the SecurityUI framework and a key class are available.
# Check if the framework bundle exists
security_ui_bundle = NSBundle.bundleWithPath_(
'/System/Library/Frameworks/SecurityUI.framework'
)
if security_ui_bundle:
print(f"SecurityUI framework bundle found at {security_ui_bundle.bundlePath()}")
print(f"Framework version: {security_ui_bundle.bundleShortVersionString()}")
else:
print("SecurityUI framework bundle not found or inaccessible. "
"Ensure you are running on macOS.")
# Verify a key class from the framework can be imported and accessed
try:
auth_class = SFAuthorization
print(f"Successfully imported SFAuthorization class: {auth_class}")
# In a real application, you'd then instantiate and use auth_class
# e.g., auth = auth_class.alloc().init()
except NameError:
print("Failed to import SFAuthorization class from SecurityUI. "
"Ensure pyobjc-framework-securityui is installed and running on macOS.")
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9. Users on Python 3.9 must remain on PyObjC < 12.0.fixUpgrade to Python >= 3.10 or pin `pyobjc-framework-securityui` to a version `< 12.0`.
affects: >=12.0
breakingPyObjC 11.0 dropped support for Python 3.8. Users on Python 3.8 must remain on PyObjC < 11.0.fixUpgrade to Python >= 3.9 or pin `pyobjc-framework-securityui` to a version `< 11.0`.
affects: >=11.0
breakingPyObjC 11.1 changed how 'init' family methods handle object references, now correctly stealing a reference to `self` and returning a new one, aligning with `clang` ARC documentation. This may alter object lifecycle management for code relying on previous behavior.fixReview and update code that performs manual reference counting or relies on specific object ownership semantics for `init` methods.
affects: >=11.1
gotchaIn PyObjC 10.3, calling `__init__` for Python classes that override `__new__` was disabled. While partially reverted in 10.3.1, this can still cause issues if `__new__` is implemented but `__init__` is used with a PyObjC-provided `__new__`.fixAvoid using `__init__` with custom `__new__` implementations, or carefully manage object creation and initialization to match PyObjC's expectations for `__new__`.
affects: 10.3 - 10.3.1
gotchaExperimental free-threading support (PEP 703) was introduced in PyObjC 11.0 for Python 3.13. While a significant feature, its 'experimental' status means users should exercise caution and thorough testing.fixBe aware of the experimental nature of free-threading support. Report any issues encountered to the PyObjC project.
affects: >=11.0 (with Python 3.13+)
deprecatedAutomatic Key-Value Observing (KVO) usage for subclasses of `NSProxy` defined in Python is disabled since PyObjC 12.1. This change improves stability but means KVO will not automatically apply to such classes.fixManually implement KVO observation for `NSProxy` subclasses if needed, or refactor to avoid relying on automatic KVO for these types.
affects: >=12.1
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredRequired for all PyObjC framework bindings to function.