Registry / serialization / pyobjc-framework-cocoa

pyobjc-framework-cocoa

JSON →
library12.2.2pypypiunverified

PyObjC-framework-Cocoa provides Python wrappers for the core Cocoa frameworks on macOS, including CoreFoundation, Foundation, and AppKit. It acts as a bidirectional bridge, enabling Python developers to leverage Objective-C libraries and build full-featured macOS applications. Version 12.1 is currently available, with the project demonstrating active and sustainable maintenance, receiving regular updates.

pip install pyobjc-framework-cocoa
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-C
P
pyobjc-framework-cocoa
serializationpythonv12.2.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.95 runs
build_error
glibc
py 3.10–3.95 runs
build_error
Code
Verified usage

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

Foundation
✓ import Foundation
Imports the Foundation framework, providing basic Objective-C classes like NSObject, NSDate, etc.
AppKit
✓ import AppKit
Imports the AppKit framework, essential for building macOS graphical user interfaces.
objc
✓ import objc
Imports the core PyObjC bridge module, providing utilities and decorators like objc.IBOutlet and objc.IBAction.
PyObjCTools
✓ from PyObjCTools import AppHelper
Provides various utility functions and classes for PyObjC development, such as AppHelper for running Cocoa event loops.

This simple example demonstrates importing and using a basic class (NSDate) and a function (NSLog) from the Foundation framework, showing direct interaction with Objective-C APIs via PyObjC.

import Foundation import objc def main(): print(f"Current date and time: {Foundation.NSDate.date()}") Foundation.NSLog("Hello from PyObjC!") if __name__ == "__main__": main()
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9. Ensure your Python environment is 3.10 or later.
fix
Upgrade Python to 3.10 or a newer supported version (e.g., `pyenv install 3.10.x` and `pyenv local 3.10.x`).
affects: 12.0 and later
breakingPyObjC 11.0 dropped support for Python 3.8. Python 3.9 and later were supported in this version.
fix
Upgrade Python to 3.9 or a newer supported version.
affects: 11.0 and later
breakingThe `IMServicePlugIn` framework bindings were removed in PyObjC 10.0, as the framework was deprecated in macOS 10.13 and removed in macOS 14.
fix
Migrate away from the `IMServicePlugIn` framework to supported macOS APIs if your application relies on instant messaging services.
affects: 10.0 and later
breakingChanges in PyObjC 10.3 initially prevented the use of `__init__` when a user implemented `__new__`. While partially re-enabled in 10.3.1 for custom `__new__` implementations, classes relying on the `__new__` provided by PyObjC still cannot use `__init__`.
fix
Review classes with custom `__new__` and `__init__` for compatibility; avoid using `__init__` for classes relying on the default PyObjC `__new__`.
affects: 10.3, 10.3.1
breakingPyObjC 11.1 aligned its behavior with `clang`'s Automatic Reference Counting (ARC) documentation for initializer methods. Methods in the 'init' family now correctly steal a reference to `self` and return a new reference.
fix
Applications interacting with Objective-C initializer methods may need to review their memory management assumptions, though for most Python users, this change makes PyObjC more compliant with underlying Objective-C semantics.
affects: 11.1 and later
gotchaKey-Value Observing (KVO) with Python collections (lists, dictionaries) is not automatically supported. For instance variables that will be observed and contain a sequence or mapping, use `NSMutableArray` or `NSMutableDictionary` instances instead of Python lists or dictionaries.
fix
Replace Python lists with `NSMutableArray` and Python dicts with `NSMutableDictionary` for KVO-observed attributes.
affects: All versions
gotchaDeveloping PyObjC applications requires Xcode Command Line Tools to be installed on macOS for building and compilation.
fix
Install Xcode Command Line Tools by running `xcode-select --install` in the terminal.
affects: All versions
Upgrade
Version history
12.2.2latest on PyPI · released Aug 11, 2026
Audit
Dependencies
pyobjc-corerequiredProvides the core Python-Objective-C bridge functionality upon which all framework wrappers are built.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
pyobjc-framework-cocoa — pip install pyobjc-framework-cocoa · libregistry