Registry /
auth-security / pyobjc-framework-safetykit
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.920 runs
build_error
glibcpy 3.10–3.920 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SafetyKit
✓ import SafetyKit
Framework classes and functions are typically imported directly from a package named after the framework.
Demonstrates how to import the `SafetyKit` framework and access a representative class like `SNSafetyChecker`. Actual interaction with SafetyKit APIs requires consulting Apple's official documentation for Objective-C, as PyObjC provides direct bindings.
import SafetyKit
import objc
# SafetyKit provides APIs for parental controls and screen time.
# Actual usage typically involves interacting with system services
# and requires specific macOS versions and user permissions.
# This quickstart demonstrates importing the framework and accessing a known class.
try:
# SNSafetyChecker is a primary class within the SafetyKit framework.
_ = SafetyKit.SNSafetyChecker
print("Successfully imported SafetyKit and accessed SNSafetyChecker class.")
print("Refer to Apple's official SafetyKit documentation for detailed API usage.")
# Example: To interact with a class, you would follow Apple's Objective-C API patterns.
# For instance, if SNSafetyChecker had a static method 'isSupported':
# if hasattr(SafetyKit.SNSafetyChecker, 'isSupported'):
# print(f"SNSafetyChecker.isSupported(): {SafetyKit.SNSafetyChecker.isSupported()}")
except AttributeError:
print("Could not find SNSafetyChecker in SafetyKit. "
"This might indicate an unsupported macOS version or an incorrect class name.")
except Exception as e:
print(f"An unexpected error occurred during SafetyKit access: {e}")
Debug
Known issues
breakingPyObjC has dropped support for older Python versions in recent major releases. Version 12.0 dropped support for Python 3.9, and version 11.0 dropped support for Python 3.8. Ensure your Python environment meets the `pyobjc-framework-safetykit` requirements (currently >=3.10).fixUpgrade Python to 3.10 or later, or use an older PyObjC version compatible with your Python environment.
affects: 11.0, 12.0
breakingThe core PyObjC bridge changed its modeling of Automatic Reference Counting (ARC) for initializer methods in v11.1. Methods in the 'init' family now correctly steal a reference to self and return a new one, aligning with clang's documentation. Code relying on previous, potentially incorrect, reference counting behavior for initializers may break.fixReview and update code that customizes or interacts heavily with Objective-C object initialization, ensuring compliance with standard ARC rules.
affects: 11.1 and later
breakingBehavior around `__init__` and `__new__` when subclassing Objective-C classes in Python was altered in PyObjC 10.3 and partially reverted in 10.3.1. While `__init__` usage was reintroduced for user-defined `__new__`, code relying on PyObjC's default `__new__` cannot use `__init__`. This can affect Python subclasses of Objective-C types.fixIf subclassing Objective-C classes and encountering initialization issues, ensure `__new__` is correctly implemented or avoid `__init__` if relying on PyObjC's default `__new__` behavior.
affects: 10.3, 10.3.1 and later
gotchaPyObjC framework wrappers, including `pyobjc-framework-safetykit`, do not include their own detailed documentation for the Objective-C APIs. Users must consult Apple's official developer documentation for the 'SafetyKit' framework to understand class structures, methods, and usage patterns.fixAlways refer to Apple's official SafetyKit documentation (e.g., via developer.apple.com) when implementing features using this library.
affects: All versions
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjcrequiredProvides the core bridge between Python and Objective-C, essential for all PyObjC framework bindings.