{"id":6078,"library":"pyobjc-framework-callkit","title":"PyObjC Framework CallKit","description":"PyObjC Framework CallKit provides Python wrappers for Apple's CallKit framework on macOS. It allows Python applications to interact with the system's call services, manage incoming and outgoing calls, and integrate with VoIP functionality. PyObjC frameworks typically follow the release cadence of macOS SDK updates, with frequent minor and patch releases to support new features and address compatibility.","status":"active","version":"12.1","language":"en","source_language":"en","source_url":"https://github.com/ronaldoussoren/pyobjc","tags":["macos","objective-c","cocoa","voip","callkit","framework"],"install":[{"cmd":"pip install pyobjc-framework-callkit","lang":"bash","label":"Install CallKit framework bindings"}],"dependencies":[{"reason":"Provides the core bridge between Python and Objective-C runtime, essential for all PyObjC framework bindings.","package":"pyobjc-core","optional":false}],"imports":[{"note":"Framework imports are case-sensitive and typically match the PascalCase name of the Objective-C framework (e.g., 'CallKit', not 'callkit').","wrong":"from callkit import *","symbol":"*","correct":"from CallKit import *"},{"note":"Import specific classes for better clarity and to avoid namespace pollution.","symbol":"CXCallController","correct":"from CallKit import CXCallController"}],"quickstart":{"code":"import objc\nfrom CallKit import CXCallController\n\n# Instantiate a CallKit controller. \n# This action itself is valid, but for a CXCallController to be fully functional\n# and interact with the system, it must be part of a running macOS application\n# with appropriate CallKit entitlements.\ncontroller = CXCallController.alloc().init()\nprint(f\"Created CallKit controller instance: {controller}\")\nprint(f\"Class name: {controller.__class__.__name__}\")\n\n# In a real application, you would use this controller to create and request\n# `CXTransaction` objects containing actions like `CXStartCallAction` or `CXEndCallAction`.\n# Example of how you might start a call (requires full app context and entitlements):\n# import uuid\n# from CallKit import CXTransaction, CXStartCallAction, CXHandle\n# \n# handle = CXHandle.alloc().initWithType_value_(0, \"123-456-7890\") # CXHandleTypePhoneNumber = 0\n# call_uuid = objc.pyobjc_id(uuid.uuid4())\n# start_action = CXStartCallAction.alloc().initWithCallUUID_handle_(call_uuid, handle)\n# start_action.setOutgoing_connectionAddress_hasOutgoingProvider_ttyType_(\n#     True, None, True, 0 # CXTTYTypeNone = 0\n# )\n# transaction = CXTransaction.alloc().initWithActions_([start_action])\n# # controller.requestTransaction_completion_(transaction, lambda error: ...)","lang":"python","description":"This quickstart demonstrates how to import and instantiate a core CallKit class, `CXCallController`. While the instantiation itself is functional, a complete CallKit integration requires a full macOS application with proper entitlements and event loop management. The commented section shows how you would typically initiate a call action."},"warnings":[{"fix":"Upgrade Python to 3.10 or later.","message":"PyObjC 12.0 dropped support for Python 3.9. Ensure your Python environment is 3.10 or newer to use this version of the library.","severity":"breaking","affected_versions":"12.0+"},{"fix":"Upgrade Python to 3.9 or later.","message":"PyObjC 11.0 dropped support for Python 3.8. Users on PyObjC 11.x and later must use Python 3.9 or newer.","severity":"breaking","affected_versions":"11.0+"},{"fix":"Upgrade to PyObjC 10.3.1 or later, or ensure your Python classes implement their own `__new__` if they rely on `__init__` in conjunction with `objc.super`.","message":"PyObjC 10.3 introduced a change where `__init__` could not be used when the class used the PyObjC-provided `__new__` (i.e., didn't define its own `__new__`). This was partially reverted in 10.3.1 but could still affect code on 10.3.0.","severity":"breaking","affected_versions":"10.3.0"},{"fix":"Review code interacting with Objective-C 'init' methods for potential changes in object lifecycle and reference counting, especially if manual memory management was previously assumed or if objects were unexpectedly deallocated/retained.","message":"PyObjC 11.1 aligned the core bridge's Automatic Reference Counting (ARC) behavior for 'init' family methods (e.g., `alloc().init()`) to correctly model that they steal a reference to self and return a new one. This change in memory management semantics could affect existing code that relies on previous PyObjC behavior around initializers.","severity":"gotcha","affected_versions":"11.1+"},{"fix":"Ensure your development and deployment environment is macOS with Xcode Command Line Tools installed.","message":"PyObjC, including `pyobjc-framework-callkit`, is a macOS-specific library. These bindings will only function on macOS operating systems and require the relevant macOS SDK (typically installed via Xcode Command Line Tools).","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}