{"id":6432,"library":"pyobjc-framework-gamesave","title":"PyObjC GameSave Framework","description":"pyobjc-framework-gamesave provides Python bindings for Apple's macOS GameSave framework. It is part of the larger PyObjC bridge, which allows Python scripts to use and extend Objective-C class libraries, primarily the Cocoa frameworks. The library is actively maintained, with releases frequently aligning with new macOS SDK versions, and its current version is 12.1.","status":"active","version":"12.1","language":"en","source_language":"en","source_url":"https://github.com/ronaldoussoren/pyobjc","tags":["macos","objective-c","cocoa","bindings","gamesave","apple"],"install":[{"cmd":"pip install pyobjc-framework-gamesave","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core PyObjC bridge functionality, implicitly required by all PyObjC framework wrappers.","package":"pyobjc-core"},{"reason":"Requires Python 3.10 or later.","package":"Python","optional":false}],"imports":[{"note":"PyObjC maps macOS frameworks directly to Python packages with the same name.","symbol":"GSGameSaveManager","correct":"from GameSave import GSGameSaveManager"}],"quickstart":{"code":"from GameSave import GSGameSaveManager\nfrom Foundation import NSObject # Common base class for Objective-C objects\n\n\ndef main():\n    print('Attempting to interact with GSGameSaveManager...')\n    # In Objective-C, objects are typically allocated then initialized.\n    # PyObjC follows this pattern for many Cocoa classes.\n    try:\n        manager = GSGameSaveManager.alloc().init()\n        print(f'Successfully initialized GSGameSaveManager: {manager.description()}.')\n        # Further GameSave API calls would go here.\n        # Example: manager.loadGameSavesWithCompletionHandler_(...)\n    except Exception as e:\n        print(f'Error initializing GSGameSaveManager: {e}')\n        print('Note: GameSave framework might require specific application entitlements or context.')\n\nif __name__ == '__main__':\n    # For Cocoa applications, an event loop is often required.\n    # For simple script usage, direct execution might suffice or need AppKit integration.\n    # import AppKit\n    # AppKit.NSApplication.sharedApplication()\n    # main()\n    # AppKit.NSApp.run()\n    main()","lang":"python","description":"This example demonstrates how to import and instantiate `GSGameSaveManager`, a core class from the GameSave framework, using PyObjC. It follows the common Objective-C `alloc().init()` pattern for object creation and prints the object's description. Note that actual GameSave operations might require a running macOS application context or specific entitlements."},"warnings":[{"fix":"Upgrade to Python 3.10 or later, or downgrade `pyobjc-framework-gamesave` to a compatible version if one existed (note: GameSave bindings were introduced in 12.0).","message":"PyObjC 12.0 (which introduced `pyobjc-framework-gamesave`) dropped support for Python 3.9. Users on Python 3.9 or older must use an earlier PyObjC version or upgrade Python.","severity":"breaking","affected_versions":"<12.0"},{"fix":"Upgrade to Python 3.9 or later (for PyObjC 11.x), or 3.10 or later (for PyObjC 12.x).","message":"PyObjC 11.0 dropped support for Python 3.8. Ensure your Python environment is 3.9 or later if using PyObjC 11.x, or 3.10+ for 12.x.","severity":"breaking","affected_versions":"<11.0"},{"fix":"Ensure `pyobjc-framework-gamesave` is installed with `pyobjc-core>=12.0`. Use `pip install 'pyobjc-framework-gamesave>=12.0'`.","message":"`pyobjc-framework-gamesave` bindings were first introduced in PyObjC version 12.0. This package is not available for PyObjC versions older than 12.0.","severity":"gotcha","affected_versions":"<12.0"},{"fix":"Upgrade to `pyobjc-framework-gamesave` version 12.1 or later to avoid potential installation issues on Python 3.9 (though Python 3.9 itself is not supported by PyObjC 12.x).","message":"PyObjC 12.0 incorrectly indicated support for Python 3.9 in its packaging metadata. This was fixed in PyObjC 12.1.","severity":"gotcha","affected_versions":"12.0"},{"fix":"Review the PyObjC 10.3 and 10.3.1 release notes regarding `__init__` and `__new__` behavior, and ensure your custom `__new__` implementations are compatible with the specific PyObjC version used.","message":"PyObjC's handling of `__init__` when a user implements `__new__` changed in v10.3, then partially reverted in v10.3.1. If you are subclassing Objective-C classes in Python and using custom `__new__`, be aware of potential breakage around object initialization.","severity":"gotcha","affected_versions":"10.3"},{"fix":"Consult PyObjC documentation for current free-threading support status with Python 3.13. For stability, consider using non-free-threaded Python 3.13 or Python 3.12 until full support is confirmed.","message":"Experimental free-threading (PEP 703) in Python 3.13 is not fully supported by PyObjC 10.3. While experimental support was introduced in PyObjC 11.0, significant changes were required in the core. Exercise caution if using PyObjC with free-threaded Python 3.13.","severity":"gotcha","affected_versions":"10.3, 11.0"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z"}