Registry / payments / pyobjc-framework-storekit

pyobjc-framework-storekit

JSON →
library12.2pypypiunverified

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.

pip install pyobjc-framework-storekit
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-S
P
pyobjc-framework-storekit
paymentspythonv12.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

StoreKit
import StoreKit
All classes, constants, and functions from the StoreKit framework are available after importing `StoreKit`.

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.

import objc from Foundation import NSObject from StoreKit import SKPaymentQueue from PyObjCTools import AppHelper class StoreKitDelegate(NSObject): def paymentQueue_updatedTransactions_(self, queue, transactions): for transaction in transactions: print(f"Transaction State: {transaction.transactionState}, Product ID: {transaction.payment.productIdentifier}") # Other delegate methods would go here, e.g., for purchase failures, restores, etc. def main(): print("Initializing StoreKit components...") # Obtain the default payment queue queue = SKPaymentQueue.defaultQueue() # Create and set a delegate (critical for handling transaction updates) delegate = StoreKitDelegate.alloc().init() queue.addTransactionObserver_(delegate) print("StoreKit observation started. This requires a running Cocoa event loop.") print("To actually initiate purchases, you would call queue.addPayment_(SKPayment.paymentWithProduct_)") print("Note: Full StoreKit functionality requires an application signed by Apple and distributed via the Mac App Store.") # In a real app, AppHelper.runEventLoop() would be called, typically after setting up the GUI # AppHelper.runEventLoop() if __name__ == '__main__': main()
Debug
Known issues
breakingPyObjC version 12.0 dropped support for Python 3.9, and version 11.0 dropped support for Python 3.8. Ensure your project uses Python 3.10 or later for `pyobjc-framework-storekit` 12.x.
fix
Upgrade to Python 3.10 or newer, or use an older `pyobjc-framework-storekit` version compatible with your Python environment.
affects: >=11.0
breakingStarting with PyObjC 11.1, the core bridge's behavior for Objective-C initializer methods aligns with `clang`'s Automatic Reference Counting (ARC) documentation. Methods in the 'init' family now correctly steal a reference to `self` and return a new reference. This might affect custom memory management patterns or interactions with C/Objective-C code directly.
fix
Review any manual reference counting logic, especially around `init` methods, to ensure it's compatible with ARC semantics.
affects: >=11.1
gotchaThe StoreKit framework is primarily designed for applications distributed through the Mac App Store and requires code signing by Apple. Developing with StoreKit outside of this context (e.g., for standalone scripts or non-App Store distribution) is severely limited or impossible.
fix
Ensure your development environment and application distribution plan comply with Apple's requirements for StoreKit usage. Testing often involves Xcode's StoreKit Configuration files.
affects: all
gotchaPyObjC 10.3 initially removed support for calling `__init__` when a user-defined `__new__` was present, breaking some projects. Version 10.3.1 reintroduced the ability to use `__init__` in such cases, but only if the class or a superclass explicitly implements `__new__`. If you rely on PyObjC's default `__new__`, `__init__` cannot be used.
fix
For classes with user-defined `__new__`, ensure `__init__` is called explicitly if needed. For classes relying on PyObjC's default `__new__`, avoid implementing `__init__` or refactor the initialization logic.
affects: 10.3
gotchaExperimental support for Python 3.13's free-threading (PEP 703) was introduced in PyObjC 11.0. However, PyObjC 10.3 explicitly stated it did not support free-threading. While there's experimental support, caution is advised, and stability with free-threading may still be evolving.
fix
If targeting Python 3.13 with free-threading, test thoroughly and be aware that behavior might be experimental or not fully stable. Consider using standard Python threading if issues arise.
affects: >=10.3
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredThe core PyObjC bridge is required for all framework wrappers.
Agent activity
35 hits · last 30 days
node
32
OpenAI (training)
1
Resources
pyobjc-framework-storekit — pip install pyobjc-framework-storekit · libregistry