{"id":6430,"library":"pyobjc-framework-arkit","title":"PyObjC ARKit Framework","description":"This library provides Python bindings for Apple's ARKit framework, enabling Python applications to leverage Augmented Reality capabilities on macOS and iOS. The current version is 12.1, with releases typically tied to macOS SDK updates, introducing major versions for new macOS support and minor versions for bug fixes and incremental SDK changes.","status":"active","version":"12.1","language":"en","source_language":"en","source_url":"https://github.com/ronaldoussoren/pyobjc","tags":["macos","augmented reality","apple","framework wrapper","arkit"],"install":[{"cmd":"pip install pyobjc-framework-arkit","lang":"bash","label":"Install pyobjc-framework-arkit"}],"dependencies":[{"reason":"Core bridge library required for all PyObjC framework bindings.","package":"pyobjc-core"}],"imports":[{"symbol":"ARSession","correct":"from ARKit import ARSession"},{"symbol":"ARWorldTrackingConfiguration","correct":"from ARKit import ARWorldTrackingConfiguration"}],"quickstart":{"code":"import objc\nfrom ARKit import ARSession, ARWorldTrackingConfiguration\nfrom Foundation import NSObject # Useful for general Cocoa classes\n\n# ARKit is a macOS/iOS framework, so check for its presence\nif not objc.is_defined('ARSession'):\n    print(\"ARKit framework is not available on this system or macOS version.\")\nelse:\n    print(\"ARKit framework is available.\")\n    \n    # Allocate and initialize an ARSession\n    session = ARSession.alloc().init()\n    print(f\"Created ARSession object: {session}\")\n    \n    # Create a configuration for the session\n    config = ARWorldTrackingConfiguration.new()\n    print(f\"Created ARWorldTrackingConfiguration object: {config}\")\n    \n    # Check if ARSession is supported on the device\n    is_supported = ARSession.isSupported()\n    print(f\"ARSession.isSupported(): {is_supported}\")\n    \n    # In a full application, you would run the session like this:\n    # session.runWithConfiguration_(config)\n    # print(\"ARSession started.\")","lang":"python","description":"This quickstart demonstrates how to import key ARKit classes like `ARSession` and `ARWorldTrackingConfiguration` using PyObjC. It shows basic object instantiation and checks for ARKit availability, which is crucial as it's an Apple-specific framework. The example also calls a class method (`isSupported()`) to illustrate interaction with the underlying Objective-C API."},"warnings":[{"fix":"Upgrade `pyobjc-framework-arkit` to version 12.0 or later to access ARKit bindings.","message":"The ARKit framework bindings were first introduced in PyObjC version 12.0. If your project targets an older PyObjC version (e.g., 11.x or prior), the `ARKit` framework will not be available.","severity":"breaking","affected_versions":"<12.0"},{"fix":"Upgrade your Python environment to 3.10 or newer before upgrading `pyobjc-framework-arkit` to version 12.0 or later.","message":"PyObjC 12.0 dropped support for Python 3.9. Users must ensure their Python environment is running Python 3.10 or a newer version.","severity":"breaking","affected_versions":"12.0+"},{"fix":"Ensure your development and deployment environment is macOS or an iOS-based platform.","message":"PyObjC and its framework wrappers, including `pyobjc-framework-arkit`, are exclusively for macOS and iOS (via cross-compilation tools like BeeWare). This library cannot be used on Windows, Linux, or other non-Apple operating systems.","severity":"gotcha","affected_versions":"all"},{"fix":"Review object lifecycle management, particularly for custom `init` method implementations, when migrating from PyObjC versions older than 11.1.","message":"Starting with PyObjC 11.1, the core bridge's Automatic Reference Counting (ARC) behavior for Objective-C `init` methods was aligned more strictly with `clang`'s documentation. `init` methods now correctly 'steal' a reference to `self` and return a new one. This change might subtly affect object lifecycle and memory management, especially if you have custom `init` implementations or rely on previous PyObjC behavior.","severity":"gotcha","affected_versions":"11.1+"},{"fix":"Avoid using PyObjC in a free-threaded Python 3.13 environment. Monitor PyObjC releases for official free-threading support.","message":"PyObjC currently does not support the experimental free-threading (PEP 703) introduced in Python 3.13. Running PyObjC with free-threading enabled in Python 3.13 may lead to undefined behavior, crashes, or incorrect functionality.","severity":"gotcha","affected_versions":"10.3+, for Python 3.13 users"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}