NewThe Flutter Kit — Flutter boilerplate$149$69
Template · Production Code · RevenueCat-Wired

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.

Last updated: 2026-05-16 7 min read By Ahmed Gagan, iOS Engineer
Quick Answer

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.

Code size
~180 lines (paywall view)
Dependencies
RevenueCat only
Theming
DesignSystem.swift token-driven
Compatible with
iOS 16+ · Liquid Glass on iOS 26

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.

Presenting the paywall
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.

DesignSystem.swift (excerpt)
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.

Get The Swift Kit — $99

Frequently Asked Questions

What's included in The Swift Kit paywall template?
A complete production SwiftUI paywall: dynamic offering rendering from RevenueCat, monthly/annual toggle with savings badge, free-trial badge handling, feature comparison list with checkmarks, restore-purchases button, subscription terms link, dismiss flow, and full theming via DesignSystem.swift. Drops into any SwiftUI app via .sheet or .fullScreenCover.
Can I customize the paywall design?
Yes — the paywall reads colors, fonts, spacing, and surface style from DesignSystem.swift. Change one token (e.g., primary color) and the paywall recolors. For deeper changes, the paywall is plain SwiftUI — modify the view directly.
Does this work with RevenueCat Paywall Builder?
Yes. The Swift Kit's native SwiftUI paywall is the default, but you can swap in RevenueCat's hosted Paywall Builder views with a one-line change. Use Paywall Builder for rapid A/B testing without code releases; use the native template for deep design integration.
How does the trial logic work?
RevenueCat handles trial eligibility under the hood. The template reads `Package.storeProduct.introductoryDiscount` and displays "Try 7 days free" if eligible. Apple's rules (one trial per subscription group per Apple ID) are enforced automatically by StoreKit.
Does it support promotional offers?
Yes. RevenueCat's promotional offer flow integrates with the template — when a user is eligible for a win-back offer, the paywall shows the discounted price. The template displays both the regular and discounted price with strike-through.
Can I A/B test paywalls with this template?
Yes. The Swift Kit ships a paywall variant pattern — define multiple paywall views and route users to them via RevenueCat's targeting rules or PostHog feature flags. Both integrations are pre-wired.

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 — $99

One-time purchase · Lifetime updates · 14-day refund