Your First Paywall
Create a Product-backed paywall, publish it, and verify purchase and access on iOS
This guide adds commerce to the first-publish path. You will connect a real App Store Product to an Experience, complete checkout, and verify the Feature access granted by the purchase.
Before you begin
You need:
- An iOS app in Nuxie and App Store Connect.
- A StoreKit Product identifier for the item you will sell.
- An Xcode project targeting iOS 15 or later.
- A decision about purchase ownership: native Nuxie StoreKit, or an app-owned provider delegate.
Use the App Store sandbox while qualifying the flow.
1. Create or import the Product
Open the app’s Products area. Create a Product or import it from App Store Connect. Confirm that its App Store processor ID exactly matches the StoreKit Product identifier.
Add the Price and introductory offer information you intend to show. StoreKit remains authoritative for the localized price and current eligibility on the device.
2. Define the access it grants
Create the Feature your app should check — for example, premium or unlimited_exports. Add an Entitlement from the Product to that Feature.
Gate app capabilities by Feature, not by hard-coded ownership of one Product. This lets pricing and Product packaging change without rewriting the access check.
3. Ask Nuxie to build the paywall
Start a New Task. Include the audience, entry moment, Product, outcome, and design constraints:
Create an annual-first paywall for free users who reach the export limit. Use our monthly and annual Products, show the localized terms, allow dismissal, and treat confirmed purchase as the Goal.
Nuxie creates the Project and binds the authored purchase action to the selected Product.
4. Review Design and Flow
In Design, check the visual hierarchy, offer clarity, terms, and app fit.
In Flow, confirm:
- One starting point.
- The correct event trigger.
- Purchase and restore actions reference the intended Product.
- A dismissal path exists when the Experience is dismissible.
- The Goal follows successful purchase completion rather than the initial tap.
- Error, cancellation, pending, and unavailable-Product branches behave intentionally.
Run every important branch in Preview. Preview can simulate authored behavior, but final StoreKit proof belongs in the integrated app.
5. Publish
Choose Publish, review the app, environment, trigger, audience, and changes, then approve Production publish. Wait for Published.
If this is the app’s first Experience, continue into Connect your app.
6. Configure the SDK
Install and set up the SDK using the generated handoff. Native StoreKit is the default:
// nuxie-doc-snippet: first-paywall-setup
import Nuxie
let configuration = NuxieConfiguration(apiKey: "your_api_key")
try NuxieSDK.shared.setup(with: configuration)
When RevenueCat, Superwall, or your app owns checkout, set the outcome-only NuxiePurchaseDelegate. Set .observer only when the app or provider also owns StoreKit finishing. See Purchases for the complete authority contract.
7. Fire the real trigger
Call the exact event from Connect your app where the paywall belongs:
// nuxie-doc-snippet: first-paywall-trigger
import Nuxie
NuxieSDK.shared.trigger("export_limit_reached")
Confirm Connected, then Shown, in Nuxie.
8. Complete and verify purchase
Use an App Store sandbox account to buy the Product. Confirm:
- StoreKit or the configured delegate reports a real commercial outcome.
- The transaction is durably synchronized to Nuxie.
- The Journey reaches the authored Goal.
- The app’s Feature check allows the capability.
// nuxie-doc-snippet: first-paywall-feature-access
import Nuxie
func canExportWithoutLimit() async throws -> Bool {
let access = try await NuxieSDK.shared.hasFeature("unlimited_exports")
return access.allowed
}
For a metered or credit-backed capability, use useFeatureAndWait before an irreversible side effect so the server confirms the consumption.
9. Verify recovery paths
Before launch, test:
- User cancellation.
- Pending purchase.
- Purchase failure.
- Restore with and without prior purchases.
- Missing or unavailable StoreKit Product.
- Relaunch after purchase.
- An update whose new Version fails to build.