{"library":"pyobjc-framework-externalaccessory","title":"PyObjC ExternalAccessory Framework","description":"PyObjC is a bridge between Python and the Objective-C runtime, allowing Python scripts to interact with macOS frameworks. The `pyobjc-framework-externalaccessory` package provides Python wrappers for the `ExternalAccessory` framework on macOS, enabling interaction with MFi (Made for iOS) accessories. The current version is 12.1, with releases tightly coupled to macOS SDK updates and Python version support cycles.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-externalaccessory"],"cli":null},"imports":["import ExternalAccessory"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import ExternalAccessory\nimport objc\n\ndef list_accessories():\n    manager = ExternalAccessory.EAAccessoryManager.sharedAccessoryManager()\n    accessories = manager.connectedAccessories()\n\n    if accessories:\n        print(f\"Found {len(accessories)} connected accessories:\")\n        for acc in accessories:\n            print(f\"  - Name: {acc.name()}\")\n            print(f\"    Model Number: {acc.modelNumber()}\")\n            print(f\"    Manufacturer: {acc.manufacturer()}\")\n            print(f\"    Serial Number: {acc.serialNumber()}\")\n            print(f\"    Firmware Revision: {acc.firmwareRevision()}\")\n            print(f\"    Hardware Revision: {acc.hardwareRevision()}\")\n            print(f\"    Protocol Strings: {acc.protocolStrings()}\")\n    else:\n        print(\"No MFi accessories connected.\")\n\n# Note: EAAccessoryManager typically requires an active runloop or\n# an application context to correctly detect accessories and receive notifications.\n# For simple scripting, you might need to run a console event loop.\n# import PyObjCTools.AppHelper\n# PyObjCTools.AppHelper.runConsoleEventLoop(installInterrupt=True, mode=objc.NSDefaultRunLoopMode, untilIdle=True)\n\nif __name__ == '__main__':\n    # This part runs the list_accessories function immediately.\n    # In a full Cocoa app, this would be part of a delegate or controller.\n    # For a simple script, it will just check at startup.\n    list_accessories()","lang":"python","description":"This quickstart demonstrates how to access the shared `EAAccessoryManager` and list currently connected MFi accessories. While this code runs, full interaction with `ExternalAccessory` (e.g., establishing communication sessions, receiving notifications) often requires an active Cocoa event loop and proper application lifecycle management, which is typically handled by `PyObjCTools.AppHelper` in more complex PyObjC applications.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":null,"pypi_latest":"12.1","is_stale":null,"summary":{"python_range":"3.10–3.9","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.1,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.9,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyobjc-framework-externalaccessory","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.7,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}