SwiftUI Paywall Template — Production-Ready RevenueCat Code
A production SwiftUI paywall with RevenueCat — monthly/annual toggle, trial badges, restore purchases, theming. Used in real shipped apps.
The Swift Kit\'s SwiftUI paywall template is production-ready, RevenueCat-wired code that ships in a real iOS app. It includes dynamic offering rendering, monthly/annual toggle with savings badge, free-trial detection, restore-purchases button, feature comparison list, and complete theming via DesignSystem.swift. Drop into any SwiftUI app via .sheet or .fullScreenCover — under 200 lines of code, no third-party UI libraries.
What's in the Template
Everything you need to ship a converting subscription paywall:
- Dynamic offering rendering — paywall reflects RevenueCat dashboard
- Monthly / annual toggle with auto-calculated savings %
- Free trial badge ("Try 7 days free")
- Feature comparison list with theme-able checkmarks
- Restore purchases button (Apple required)
- Subscription terms + privacy policy links
- Promotional offer rendering
- Skeleton loading state while offerings fetch
- Error state with retry
- Dismiss animation matched to surface style (Glass, Liquid Glass, Flat, etc.)
Drop-In Usage
Present the paywall from anywhere in your app — sheet, full-screen cover, or push-onto navigation. The view fetches its own offering and gates the entire surface on subscription state.
struct ContentView: View {
@State private var showPaywall = false
@Environment(SubscriptionModel.self) var subscription
var body: some View {
Button("Unlock Premium") { showPaywall = true }
.disabled(subscription.isPremium)
.sheet(isPresented: $showPaywall) {
PaywallView()
.presentationDetents([.large])
.presentationDragIndicator(.visible)
}
}
}Theming via DesignSystem.swift
Change one token to recolor the entire paywall. The same DesignSystem powers every surface in the app, so the paywall always looks like the rest of your app.
enum DesignSystem {
// Edit these — the paywall picks them up automatically
static let primary = Color(hex: "#8A2BE2")
static let accent = Color(hex: "#FF8A00")
static let cornerRadius: CGFloat = 16
static let surfaceStyle: SurfaceStyle = .liquidGlass // .flat, .bordered, .elevated, .glass, .liquidGlass
}When to Use vs. RevenueCat Paywall Builder
Both ship in The Swift Kit. Choose by goal:
- Native template — best for deep design integration and full theme control
- RevenueCat Paywall Builder — best for rapid A/B testing without code releases
- You can swap between them with a single view substitution
- Most apps use the native template for v1 and add Paywall Builder later for testing
Skip building the paywall.
The Swift Kit ships the paywall + RevenueCat + design system, ready to compile. $99 one-time.
Frequently Asked Questions
What's included in The Swift Kit paywall template?
Can I customize the paywall design?
Does this work with RevenueCat Paywall Builder?
How does the trial logic work?
Does it support promotional offers?
Can I A/B test paywalls with this template?
Keep exploring
Ship your iOS app 10× faster
The Swift Kit gives you a production-ready SwiftUI boilerplate — design system, paywall, auth, AI, all pre-wired. $99 one-time.
Get The Swift Kit — $99One-time purchase · Lifetime updates · 14-day refund