Adapter for Apple AppStore using StoreKit version 1

Implements

Constructors

Properties

_canMakePayments: boolean = false
_products: SKProduct[] = []

List of products loaded from AppStore

The application receipt, contains all transactions

autoFinish: boolean

True to auto-finish all transactions

context: AdapterContext
discountEligibilityDeterminer?: DiscountEligibilityDeterminer

Component that determine eligibility to a given discount offer

forceReceiptReload: boolean = false

Set to true to force a full refresh of the receipt when preparing a receipt validation call.

This is typically done when placing an order and restoring purchases.

id: Platform = Platform.APPLE_APPSTORE

Platform identifier

log: Logger
name: string = 'AppStore'

Nice name for the adapter

needAppReceipt: boolean

True when we need to validate the application receipt

onRestoreCompleted?: ((code) => void)

Callback called when the restore process is completed

Type declaration

    • (code): void
    • Parameters

      Returns void

pseudoReceipt: CdvPurchase.Receipt

The pseudo receipt stores purchases in progress

ready: boolean = false

true after the platform has been successfully initialized.

The value is set by the "Adapters" class (which is responsible for initializing adapters).

supportsParallelLoading: boolean = true

Set to true if receipts and products can be loaded in parallel

Accessors

  • get isSupported(): boolean
  • Returns true on iOS, the only platform supported by this adapter

    Returns boolean

Methods

  • Parameters

    Returns void

  • Finish a transaction.

    For non-consumables, this will acknowledge the purchase. For consumable, this will acknowledge and consume the purchase.

    Parameters

    Returns Promise<undefined | IError>

  • Find a given product from ID

    Parameters

    • id: string

    Returns undefined | SKProduct

  • Initializes a platform adapter.

    Will resolve when initialization is complete.

    Will fail with an IError in case of an unrecoverable error.

    In other case of a potentially recoverable error, the adapter will keep retrying to initialize forever.

    Returns Promise<undefined | IError>

  • Open the platforms' billing management interface.

    Returns Promise<undefined | IError>

  • Returns Promise<void>

  • Replay the queue of transactions.

    Might ask the user to login.

    Returns Promise<undefined | IError>