storekit-rs
Safe Rust bindings for Apple's StoreKit framework on macOS.
Status: v0.2.0 expands the StoreKit 2 bridge across product lookup, purchases, transaction streams, storefronts, app transactions, subscription status, renewal info, refund entry points, receipt helpers, and verification metadata.
Quick start
use *;
Highlights
Product::products_for(...),Product::purchase(...),Product::latest_transaction(), andProduct::current_entitlements()PurchaseOptioncovers quantity, app-account tokens, custom payloads, promotional offers, win-back offers, and storefront-change policiesTransactionexposesall,current_entitlements,updates,unfinished, filtered product streams,latest_for,current_entitlement_for, verification, finishing, and refund helpersSubscriptionInfo::status_for(...)andstatus_for_transaction(...)surface renewal state, verified transactions, and verified renewal infoStorefront::current()andStorefront::updates()wrap theStoreKitstorefront APIsAppTransaction::shared()andAppTransaction::refresh()expose app-level verification resultsReceiptValidatorreads the local app receipt and decodes JWS payloads without publishing or mutating store stateStoreContext::current()summarizes bundle, receipt, payment, and device-verification context for headless tooling
Examples
The crate ships with numbered examples for each logical area:
01_product_lookup02_transaction_stream03_app_store_context04_storefront_current05_subscription_types06_subscription_info_status07_refund_request08_receipt_validator09_message_support10_app_transaction11_store_context12_renewal_info13_renewal_state14_purchase_option15_verification_result
Run them all with:
for; do ; done
Notes
StoreKit.Messageis unavailable on macOS, so the message module reportsNotSupportedthere.- Refund, review, and offer-code presentation helpers require an
NSViewController-backed window; headless callers getNotSupportedinstead of hanging. - The crate does not publish or call
cargo publish; release tagging is separate from drip-publisher rollout.
License
Licensed under either of Apache-2.0 or MIT at your option.