{"library":"pyobjc-framework-spritekit","title":"PyObjC SpriteKit Framework","description":"PyObjC provides Python bindings for Objective-C frameworks on macOS, enabling Python developers to interact with Apple's system APIs. `pyobjc-framework-spritekit` offers wrappers for the SpriteKit framework, which is Apple's high-performance 2D graphics framework used for games and other graphics-intensive applications. The library is currently at version 12.1 and maintains an active release cadence, typically aligning with new macOS SDK and Python version updates.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-spritekit"],"cli":null},"imports":["import SpriteKit","import AppKit","from PyObjCTools import AppHelper"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import AppKit\nimport SpriteKit\nfrom PyObjCTools import AppHelper\n\n# Define a simple SpriteKit scene\nclass MyScene(SpriteKit.SKScene):\n    def didMoveToView_(self, view):\n        if not self.contentCreated:\n            self.createSceneContents()\n            self.contentCreated = True\n\n    def createSceneContents(self):\n        self.backgroundColor = SpriteKit.SKColor.redColor()\n        self.scaleMode = SpriteKit.SKSceneScaleMode.aspectFit\n\n        helloNode = SpriteKit.SKLabelNode.labelNodeWithFontNamed_('Chalkduster')\n        helloNode.text = 'Hello, PyObjC SpriteKit!'\n        helloNode.fontSize = 24\n        helloNode.position = AppKit.CGPointMake(self.frame().size.width / 2, self.frame().size.height / 2)\n        self.addChild_(helloNode)\n\n# Define an Application Delegate to set up the window and scene\nclass AppDelegate(AppKit.NSObject):\n    def applicationDidFinishLaunching_(self, notification):\n        rect = AppKit.NSMakeRect(0, 0, 800, 600)\n        self.window = AppKit.NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(\n            rect, \n            AppKit.NSWindowStyleMaskTitled | AppKit.NSWindowStyleMaskClosable | AppKit.NSWindowStyleMaskMiniaturizable | AppKit.NSWindowStyleMaskResizable,\n            AppKit.NSBackingStoreBuffered,\n            False\n        )\n        self.window.center()\n        self.window.setTitle_('PyObjC SpriteKit Example')\n\n        # Create an SKView and set it as the window's content view\n        skView = SpriteKit.SKView.alloc().initWithFrame_(rect)\n        self.window.setContentView_(skView)\n\n        # Create and present the scene\n        scene = MyScene.sceneWithSize_(skView.bounds().size)\n        skView.presentScene_(scene)\n        skView.setShowsFPS_(True)\n        skView.setShowsNodeCount_(True)\n\n        self.window.makeKeyAndOrderFront_(None)\n\n    def applicationShouldTerminateAfterLastWindowClosed_(self, sender):\n        return True\n\n# Start the Cocoa application\nif __name__ == '__main__':\n    app = AppKit.NSApplication.sharedApplication()\n    delegate = AppDelegate.alloc().init()\n    app.setDelegate_(delegate)\n    AppHelper.runEventLoop()\n","lang":"python","description":"This quickstart demonstrates how to create a basic macOS application using PyObjC, display an `SKView` within an `NSWindow`, and present a simple `SpriteKit.SKScene` with a 'Hello, PyObjC SpriteKit!' label. It requires a running macOS environment. The `PyObjCTools.AppHelper` is used to manage the Cocoa event loop.","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-spritekit","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-spritekit","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.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc-framework-spritekit","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-spritekit","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-spritekit","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-spritekit","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-spritekit","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-spritekit","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-spritekit","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-spritekit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.4,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}