Standard purchase paths
- a StoreKit
Productdirectly withpurchase(product:) - a promoted
PurchaseIntentwithpurchase(intent:)on iOS 16.4+
placement string for host-app attribution.
Receipt pipeline diagnostics
UseonReceiptPipelineEvent when you need visibility into posting, retries, and dead-letter behavior.
Deferred and promoted purchase handling
onPurchaseIntentis for promoted purchases and win-back style intents on iOS 16.4+onDeferredPurchaseResolvedfires when a previously pending purchase later resolves
Restore vs sync vs queue drain
Use the right recovery tool:restorePurchases(syncWithAppStore: false)is the user-facing restore flowrestorePurchases(syncWithAppStore: true)forcesAppStore.sync()first and may trigger Apple sign-in UIsyncPurchases()is the quiet reconciliation path when you do not want restore UXdrainReceiptQueueAndRefreshCustomer()is the explicit advanced queue flush path and preserves oldersyncPurchases()-style behavior from earlier surfaces
Recommended mapping
- restore button in settings:
restorePurchases() - silent catch-up after app/account transitions:
syncPurchases() - operational recovery when you know receipts are queued locally:
drainReceiptQueueAndRefreshCustomer()