Registry /
gcp / pyobjc-framework-gamekit
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.
GKMatch
✓ from GameKit import GKMatch
GameKit classes are imported directly from the 'GameKit' package.
NSString
✓ from Foundation import NSString
Many PyObjC applications also interact with the foundational 'Foundation' framework.
This quickstart demonstrates how to import and interact with basic Objective-C objects via the PyObjC bridge, and how GameKit classes would be imported. Full GameKit functionality typically requires a complete macOS application context, which is beyond a simple script.
import Foundation
# Basic Objective-C object creation using the PyObjC bridge
my_string = Foundation.NSString.stringWith_("Hello from PyObjC!")
print(f"Created NSString: {my_string}")
print(f"Type of my_string: {type(my_string)}")
# To interact with the GameKit framework, you would import it similarly:
try:
import GameKit
print("GameKit imported successfully.")
# Example: Accessing a GameKit class (this shows access, but doesn't 'do' anything game-related)
_ = GameKit.GKMatch
print(f"Accessed GameKit.GKMatch class.")
except ImportError:
print("GameKit framework not available or could not be imported.")
except Exception as e:
print(f"Error accessing GameKit: {e}")
# For applications needing an event loop (e.g., actual GUI or complex GameKit interactions),
# PyObjCTools.AppHelper.runEventLoop() is typically used, but requires a full application context.
# This example just demonstrates basic object interaction and framework import.
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9, and PyObjC 11.0 dropped support for Python 3.8. Ensure your Python version is 3.10 or higher for PyObjC 12.x.fixUpgrade Python to version 3.10 or newer, or use an older PyObjC version compatible with your Python runtime.
affects: 11.0, 12.0+
breakingIn PyObjC 10.3, the behavior around `__init__` and `__new__` for Python subclasses of Objective-C classes changed significantly, potentially breaking existing code. While 10.3.1 partially reintroduced `__init__` support when `__new__` is implemented by the user, code relying on PyObjC's `__new__` cannot use `__init__`. PyObjC 10.4 introduced a more Pythonic instantiation interface, making `SomeClass(...)` equivalent to `SomeClass.alloc().init...()`.fixReview Python subclasses of Objective-C classes for `__init__` and `__new__` interactions. For new code, prefer the `SomeClass(...)` instantiation pattern introduced in 10.4. For existing code, ensure `__new__` is explicitly implemented if `__init__` is used, or adapt to the new instantiation rules.
affects: 10.3, 10.3.1, 10.4+
breakingPyObjC 11.1 aligned its behavior for initializer methods (those in the 'init' family) with `clang`'s Automatic Reference Counting (ARC) documentation. This means `init` methods now correctly steal a reference to `self` and return a new reference, changing previous `[NSObject alloc]` proxy behavior.fixIf your code directly interacts with the `alloc().init...()` pattern and relies on specific reference counting behavior during object initialization, review against ARC principles. The new behavior is generally more correct but might impact custom memory management or complex initialization chains.
affects: 11.1+
gotchaWhile PyObjC 10.3 and later may have binary wheels for Python 3.13, PyObjC does *not* currently support the experimental free-threading feature (PEP 703) in Python 3.13.fixAvoid using PyObjC in Python 3.13 environments where the experimental free-threading mode is enabled, as it is not officially supported.
affects: 10.3+
gotchaPrior to PyObjC 10.1, `os.fspath(someURL)` would not correctly handle Cocoa URLs (`NSURL`, `CFURLRef`) referring to local filesystem paths, raising `TypeError` for other URLs. This was fixed in 10.1.fixUpgrade to PyObjC 10.1 or newer to ensure correct `os.fspath` behavior with Cocoa URLs. For older versions, explicitly convert `NSURL` to a Python path string if needed.
affects: < 10.1
gotchaBefore PyObjC 12.1, there was an issue where Key-Value Observing (KVO) usage for subclasses of `NSProxy` defined in Python was not automatically disabled, which has since been fixed.fixUpgrade to PyObjC 12.1 or newer to ensure correct KVO behavior with Python subclasses of `NSProxy`.
affects: < 12.1
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredThe core bridging library between Python and Objective-C.
pyobjc-framework-cocoaoptionalCommon runtime dependency for many PyObjC applications interacting with macOS frameworks.