pyobjc-framework-sharedwithyou provides Python wrappers for Apple's SharedWithYou framework on macOS. It is part of the PyObjC project, a bidirectional bridge enabling Python scripts to interact with Objective-C libraries, including macOS Cocoa frameworks. The current version is 12.1 and it maintains an active release cadence, typically aligning with macOS SDK updates and Python version support.
pip install pyobjc-framework-sharedwithyouVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the fundamental interaction pattern with Objective-C frameworks using PyObjC, specifically showing how to import and interact with a basic Foundation object. Classes within the SharedWithYou framework would be imported and instantiated similarly through the `SharedWithYou` module.
Upgrade your Python environment to Python 3.10 or later for PyObjC 12.x. Always check `requires_python` on PyPI or the PyObjC changelog for specific version requirements.
Review code that interacts with object initialization, especially custom subclasses or factory methods, to ensure correct reference handling. While explicit memory management is rarely needed in Python, understanding the underlying Objective-C semantics is crucial for correct behavior.
If experiencing issues with `__init__` and `__new__` in custom subclasses, ensure you are on PyObjC 10.3.1 or later. If relying on PyObjC's `__new__`, avoid implementing `__init__` in that specific context.
Applications relying on `IMServicePlugIn` functionality will need to refactor to use alternative macOS APIs or ensure compatibility with older macOS versions and PyObjC releases.
Exercise caution when using PyObjC with Python 3.13's experimental free-threading. Thorough testing is recommended for multi-threaded applications. The PyObjC team continues to refine this support.
Avoid subclassing `NSString` or `NSMutableString` in Python. If custom string-like behavior is needed, wrap `NSString` instances or use standard Python string types instead.