Registry / crm-productivity / pyobjc-framework-replaykit

pyobjc-framework-replaykit

JSON →
library12.2pypypiunverified

pyobjc-framework-replaykit provides Python bindings for Apple's ReplayKit framework on macOS, enabling developers to integrate screen recording and broadcasting capabilities into their Python applications. Part of the larger PyObjC project, it closely tracks macOS SDK updates, with current version 12.1. The PyObjC project generally releases new versions multiple times a year, often aligning with major macOS releases and Python version updates.

pip install pyobjc-framework-replaykit
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-R
P
pyobjc-framework-replaykit
crm-productivitypythonv12.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.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.103.920 runs
build_error
glibc
py 3.103.920 runs
build_error
Code
Verified usage

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

ReplayKit
import ReplayKit
Framework bindings are typically imported directly by their framework name.

This example demonstrates how to check if ReplayKit is available for screen recording on the current macOS system. It sets up a minimal `PyObjCTools.AppHelper` event loop, which is often required for PyObjC applications interacting with Cocoa frameworks on the main thread. The `applicationDidFinishLaunching_` method, analogous to `AppDelegate` in Objective-C, is used to interact with the `ReplayKit.RPScreenRecorder` shared instance.

import ReplayKit from PyObjCTools import AppHelper from Foundation import NSObject, NSLog class ReplayKitChecker(NSObject): def applicationDidFinishLaunching_(self, notification): # Access the shared screen recorder instance recorder = ReplayKit.RPScreenRecorder.sharedRecorder() # Check if ReplayKit is available for recording if recorder.isAvailable(): NSLog("ReplayKit is available for screen recording.") else: NSLog("ReplayKit is not available for screen recording.") # In a real application, you'd perform further ReplayKit actions here # For this quickstart, we just check availability and then stop the application. AppHelper.stopEventLoop() if __name__ == "__main__": # Run a minimal Cocoa event loop to execute the application delegate. # This is often necessary for PyObjC code interacting with UI frameworks. AppHelper.runEventLoop(argv=[], appDelegate=ReplayKitChecker.alloc().init())
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 environment is 3.10 or newer for PyObjC 12.x.
fix
Upgrade your Python interpreter to version 3.10 or later, or use an older PyObjC version (e.g., PyObjC 10.x for Python 3.9, PyObjC 9.x for Python 3.8).
affects: 12.0+
gotchaStarting with PyObjC 11.1, the bridge's behavior for initializer methods (like `init`) was aligned with `clang`'s Automatic Reference Counting (ARC) documentation. This means 'init' family methods now correctly steal a reference to `self` and return a new one. Code relying on the prior, less correct, reference counting behavior for initializers might need adjustment.
fix
Review custom initializer methods in your Python classes exposed to Objective-C to ensure correct reference handling, especially if you manually managed `objc_object` reference counts or observed unexpected object lifetimes.
affects: 11.1+
gotchaIn PyObjC 10.3, a change prevented the use of `__init__` when a class or its superclass utilized `__new__` provided by PyObjC. While version 10.3.1 partially re-enabled `__init__` if the user *explicitly* implemented `__new__`, `__init__` still cannot be used if the class relies on PyObjC's implicit `__new__` for Objective-C object creation.
fix
If encountering issues with `__init__` not being called, ensure that if your class is an `NSObject` subclass, `__init__` is not called on an instance that was implicitly created via PyObjC's `__new__` mechanism. Consider moving initialization logic to Objective-C style initializer methods (e.g., `initWithSomething_`).
affects: 10.3 - 10.3.1
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredProvides the core bridge between Python and Objective-C, essential for all PyObjC framework wrappers. It is implicitly installed as a dependency.
Agent activity
41 hits · last 30 days
node
38
OpenAI (training)
1
Resources
pyobjc-framework-replaykit — pip install pyobjc-framework-replaykit · libregistry