Registry /
communication / pyobjc-framework-instantmessage
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.
ABPresence
✓ from InstantMessage import ABPresence
Classes and constants from the InstantMessage framework are typically imported directly from the `InstantMessage` module.
Demonstrates importing the `InstantMessage` framework bindings and attempting to access a historically available class. It includes a warning about the underlying framework's deprecation by Apple.
import InstantMessage
import objc
try:
# The InstantMessage framework itself is deprecated by Apple and removed in macOS 14.
# This example primarily demonstrates successful module import and attribute access,
# but functionality will be limited or absent on newer macOS versions.
if hasattr(InstantMessage, 'ABPresence'):
# Accessing a historically known class/protocol from the framework
ABPresence = InstantMessage.ABPresence
print(f"Successfully imported InstantMessage and found ABPresence: {ABPresence}")
print("Note: The InstantMessage framework is deprecated by Apple and its functionality may be limited or absent on recent macOS versions.")
else:
print("InstantMessage framework module loaded, but ABPresence class not found. "
"This is expected on macOS versions where the framework is removed (e.g., macOS 14+).")
except ImportError as e:
print(f"Error importing InstantMessage: {e}. "
"Ensure pyobjc-framework-instantmessage is installed and compatible with your macOS version.")
except Exception as e:
print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingThe `IMServicePlugIn` bindings are no longer available as the entire InstantMessage framework was deprecated in macOS 10.13 and removed in macOS 14. Any code relying on `IMServicePlugIn` will break on PyObjC versions 10.0 and later.fixMigrate away from the InstantMessage framework. There is no direct replacement from Apple for `IMServicePlugIn`.
affects: >=10.0
deprecatedThe underlying Apple InstantMessage framework is deprecated and has been removed in macOS 14 (Sonoma). While `pyobjc-framework-instantmessage` bindings exist, the functionality they expose will be non-existent on modern macOS versions.fixAvoid using the InstantMessage framework for new development. Consult Apple's documentation for alternative communication technologies if available, though the specific Instant Messaging capabilities may no longer be supported.
affects: All versions on macOS >= 14
breakingSupport for Python 3.9 was dropped in PyObjC 12.0.fixUpgrade to Python 3.10 or newer.
affects: >=12.0
breakingSupport for Python 3.8 was dropped in PyObjC 11.0.fixUpgrade to Python 3.9 or newer (Python 3.10+ recommended for current PyObjC versions).
affects: >=11.0
gotchaChanges in `__init__` and `__new__` behavior when subclassing Objective-C classes in Python can lead to unexpected initialization issues. Specifically, if a user implements `__new__`, `__init__` can be used; otherwise, `__init__` cannot be used with the PyObjC-provided `__new__`.fixReview PyObjC documentation on class instantiation and subclassing. Ensure `__init__` is only used when a custom `__new__` is also implemented, or follow PyObjC's recommended patterns for object initialization.
affects: >=10.3
gotchaPyObjC 11.1 introduced changes in how initializer methods (methods in the 'init' family) handle reference counts, aligning with `clang`'s Automatic Reference Counting documentation. Initiator methods now correctly steal a reference to `self` and return a new reference, which might affect manual reference counting logic in older PyObjC code.fixReview code that interacts with Objective-C initializer methods for potential reference counting mismatches, especially if performing manual memory management or interacting with 'partially initialized' objects.
affects: >=11.1
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredThis package provides bindings for a specific macOS framework and relies on the core PyObjC bridge functionality.