Documentation menu

Purpl Documentation

Paywall UI

Define the products and order for a sale and present them in a SwiftUI paywall.

Sales catalog

PurchaseCatalog contains only the products and display order for the current paywall. Keep the complete product registry and entitlement mappings in PurchaseConfiguration.

Present a paywall

SwiftUI
import Purpl
import PurplUI
import SwiftUI

let standardCatalog = PurchaseCatalog(
    identifier: "standard",
    products: [monthlyProduct, yearlyProduct]
)

PaywallView(
    configuration: PaywallConfiguration(
        catalog: standardCatalog,
        defaultProductIdentifier: yearlyProduct.productIdentifier
    )
) {
    PremiumMarketingContent()
}

Screen container ownership

PaywallView provides the purchase UI. Configure navigation, tabs, toolbars, and close buttons in the app screen that contains the paywall.