{"library":"pyobjc-framework-storekit","title":"PyObjC StoreKit Framework","description":"PyObjC is a bridge between Python and Objective-C, allowing Python scripts to use and extend macOS frameworks. `pyobjc-framework-storekit` provides Python wrappers for Apple's StoreKit framework, enabling developers to integrate in-app purchases and subscriptions into macOS applications written in Python. The current version is 12.1, and the project maintains an active release cadence, frequently updating bindings for new macOS SDKs and Python versions.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-storekit"],"cli":null},"imports":["import StoreKit"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import objc\nfrom Foundation import NSObject\nfrom StoreKit import SKPaymentQueue\nfrom PyObjCTools import AppHelper\n\nclass StoreKitDelegate(NSObject):\n    def paymentQueue_updatedTransactions_(self, queue, transactions):\n        for transaction in transactions:\n            print(f\"Transaction State: {transaction.transactionState}, Product ID: {transaction.payment.productIdentifier}\")\n\n    # Other delegate methods would go here, e.g., for purchase failures, restores, etc.\n\ndef main():\n    print(\"Initializing StoreKit components...\")\n    # Obtain the default payment queue\n    queue = SKPaymentQueue.defaultQueue()\n\n    # Create and set a delegate (critical for handling transaction updates)\n    delegate = StoreKitDelegate.alloc().init()\n    queue.addTransactionObserver_(delegate)\n\n    print(\"StoreKit observation started. This requires a running Cocoa event loop.\")\n    print(\"To actually initiate purchases, you would call queue.addPayment_(SKPayment.paymentWithProduct_)\")\n    print(\"Note: Full StoreKit functionality requires an application signed by Apple and distributed via the Mac App Store.\")\n    # In a real app, AppHelper.runEventLoop() would be called, typically after setting up the GUI\n    # AppHelper.runEventLoop() \n\nif __name__ == '__main__':\n    main()","lang":"python","description":"This quickstart demonstrates how to import the `StoreKit` framework and begin observing payment queue transactions. Note that a fully functional StoreKit implementation requires a running macOS Cocoa application context, proper provisioning profiles, and an application distributed through the Mac App Store. The `AppHelper.runEventLoop()` call, commented out here, is essential for a complete PyObjC GUI application to process events.","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-storekit","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-storekit","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-storekit","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-storekit","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.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-storekit","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-storekit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.8,"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-storekit","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-storekit","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-storekit","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-storekit","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}]}}