storekit

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the iOS shell StoreKit request surface with typed helpers.

func FromContext

func FromContext(ctx ContextBridge) Client

FromContext returns a StoreKit client derived from a Vango context.

func New

func New(bridge shell.Bridge) Client

New returns a StoreKit client bound to the provided shell bridge.

func (Client) Available

func (c Client) Available() bool

Available reports whether the bound shell bridge advertises StoreKit support.

func (Client) CurrentEntitlements

func (c Client) CurrentEntitlements(ctx context.Context) (EntitlementsResult, error)

CurrentEntitlements returns the current StoreKit entitlements without triggering restore.

func (Client) ManageSubscriptions

func (c Client) ManageSubscriptions(ctx context.Context) (ManageSubscriptionsResult, error)

ManageSubscriptions opens the native subscription management surface.

func (Client) Purchase

func (c Client) Purchase(ctx context.Context, productID string, appAccountToken string) (PurchaseResult, error)

Purchase starts a StoreKit purchase for the given product.

func (Client) PurchaseWithOptions

func (c Client) PurchaseWithOptions(ctx context.Context, options PurchaseOptions) (PurchaseResult, error)

PurchaseWithOptions starts a StoreKit purchase using the provided request options.

func (Client) QueryProducts

func (c Client) QueryProducts(ctx context.Context, productIDs []string) (ProductsResult, error)

QueryProducts resolves the provided StoreKit product identifiers.

func (Client) Restore

func (c Client) Restore(ctx context.Context) (EntitlementsResult, error)

Restore refreshes App Store purchases and returns the current entitlements.

type ContextBridge

type ContextBridge interface {
	Shell() shell.Bridge
}

ContextBridge is the subset of runtime context needed to derive a StoreKit client.

type EntitlementsResult

type EntitlementsResult = shell.IAPEntitlementsResult

EntitlementsResult is the normalized StoreKit entitlement snapshot.

type ManageSubscriptionsResult

type ManageSubscriptionsResult = shell.IAPManageSubscriptionsResult

ManageSubscriptionsResult reports whether subscription management UI was opened.

type Product

type Product = shell.IAPProduct

Product is the normalized StoreKit product descriptor returned by the iOS shell.

type ProductsResult

type ProductsResult = shell.IAPProductsQueryResult

ProductsResult is the normalized StoreKit product query result.

type PurchaseOptions

type PurchaseOptions = shell.IAPPurchaseOptions

PurchaseOptions configures a StoreKit purchase request.

type PurchaseResult

type PurchaseResult = shell.IAPPurchaseResult

PurchaseResult is the normalized StoreKit purchase result.

type Transaction

type Transaction = shell.IAPTransaction

Transaction is the normalized StoreKit transaction/entitlement descriptor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL