JustOne is a real app on the App Store, not a toy example. The patterns shown here are battle-tested in production.
What It Demonstrates
| Feature | File | What to look at |
|---|---|---|
| SDK configuration | JustOneApp.swift | ZeroSettle.shared.configure() with preloading enabled |
| Bootstrap & catalog | JustOneApp.swift | Single bootstrap() call on authentication |
| Real-time entitlements | JustOneApp.swift | entitlementUpdates async stream |
| Product models | ZeroSettleProduct.swift | Subscription tiers, consumables, pricing with fallbacks |
| Purchase manager | PurchaseManager.swift | State resolution, billing source preference, consumable crediting |
| Paywall UI | PremiumUpsellView.swift | Dual pricing (StoreKit vs web), checkout sheet with custom headers |
| Consumable shop | ConsumableShopView.swift | One-time purchases with .checkoutSheet |
| Subscription status | SettingsView.swift | Active plan display, billing provider, cancel flow |
| Switch & Save | SettingsView.swift | Migration banner for StoreKit → web |
Key Patterns
SDK Initialization
JustOne configures ZeroSettle in the app entry point with preloading enabled for instant checkout:Single Bootstrap Call
Instead of callingfetchProducts() and restoreEntitlements() separately, JustOne uses the single bootstrap() call:
Real-Time Entitlement Updates
JustOne subscribes to entitlement updates to credit consumable tokens when web purchases complete:Billing Source Preference
When a user has both StoreKit and web entitlements (e.g., after Switch & Save), JustOne prefers the web checkout entitlement:Checkout Sheet with Custom Header
JustOne’s paywall shows a branded header above the payment sheet:Price Resolution with Fallbacks
JustOne resolves live pricing from the SDK catalog but falls back to hardcoded prices if the catalog isn’t loaded yet:Get the Code
Next Steps
Quickstart
Step-by-step guide to your first integration
Payment Sheet
Full payment sheet reference
Best Practices
Production-ready patterns and recommendations
Testing
Test your integration in sandbox mode

