Contents

Product

Information about a product that you configure in App Store Connect.

Declaration

struct Product

Mentioned in

Overview

The Product type represents the in-app purchases that you configure in App Store Connect and make available for purchase within your app. Use Product to perform all product-related tasks in your app, from displaying in-app purchases and offers to making a purchase and getting transaction and subscription status information.

To get a Product instance, call products(for:) and provide one or more in-app purchase product identifiers. Use a Product instance to display in-app purchases and subscription offers in your store, as follows:

When users initiate a purchase, call purchase(options:) or purchase(confirmIn:options:) on the product instance. If your app uses SwiftUI, you can also use PurchaseAction. Set purchase options (Product.PurchaseOption) to define an optional app account token, apply a promotional offer, or set a product quantity. Purchase options can also simulate an Ask to Buy scenario when you’re testing your app in the sandbox environment.

Use a Product instance to learn whether a user is entitled to a product by checking currentEntitlement, which holds the transaction that entitles the user to the product. This transaction information, as well as the transaction in latestTransaction, are cryptographically signed by the App Store in JSON Web Signature (JWS) format.

If the product is an auto-renewable subscription, use the status and renewalInfo in the subscription information to help manage subscriptions and inform business decisions, such as presenting subscription offers.

For information about configuring In-App Purchases in App Store Connect, see Overview for configuring In-App Purchases.

Topics

Requesting products from the App Store

Displaying a product description and price

Purchasing a product

Receiving current entitlement information

Getting the latest transaction

Getting subscription information

Getting product identifiers and type

Getting Family Sharing status

Managing promoted in-app purchases

Loading products

Getting product info in JSON format

Getting subscription relationship

Deprecated

See Also

Product and subscription information