Contents

simulatesAskToBuyInSandbox(_:)

Simulates an Ask to Buy scenario when testing your app in the sandbox environment.

Declaration

static func simulatesAskToBuyInSandbox(_ simulateAskToBuy: Bool) -> Product.PurchaseOption

Parameters

  • simulateAskToBuy:

    Set to true to simulate a child’s account asking permission to make a purchase.

Return Value

An instance of Product.PurchaseOption to use in purchase(options:).

Discussion

For information about testing Ask to Buy scenarios, see Testing at all stages of development with Xcode and the sandbox.

For information about purchases made using Ask to Buy, see Approve what kids buy with Ask to Buy.