Quick Start

Follow this 7-step guide to get up and running with SuperwallKit in no time.

1. Setting Up In-App Purchases

With RevenueCat (recommended)

Superwall and RevenueCat go hand-in-hand to manage paywalls and in-app purchases. If you are using, or are planning to use, RevenueCat to handle purchases, follow their Quick Start Guide. Stop when you reach Initialize and Configure the SDK in Step 4, as we'll handle the configuration of the SDK for you. By this point, you will have installed RevenueCat, and configured your products.

Without RevenueCat

If you aren't using RevenueCat, make sure you have set up your products on App Store Connect.

2. Installing SuperwallKit

If you haven't already, sign up for a free Superwall account. Then, follow our installation guide to install the SuperwallKit SDK into your app using Swift Package Manager or CocoaPods.

3. Adding Subscription Logic

SuperwallKit automatically handles all subscription-related logic. Keep reading if you're using RevenueCat or looking to implement your own subscription logic, otherwise, you can skip to step 4.

If you're using RevenueCat, follow the steps in this guide:

Otherwise, follow the steps in this guide:

4. Adding Your Products

In order to retrieve products from the App Store to display in your paywalls, you need to add your products to Superwall.

If you already have products on App Store Connect

Follow our Products guide to learn how to add them to Superwall. Then, head to the Superwall dashboard. You'll see we have already set up an example paywall for you. Click on that and change the primary product to one of your products and click the Save button:

You'll present this paywall in the next step.

If you don't have any products yet

On the Superwall dashboard, you'll see we have already set up an example paywall for you. This has an example product attached to it. To get you familiar with presenting and purchasing a product from that paywall, follow our Setting up StoreKit testing guide to create a local StoreKit configuration file in Xcode and add a test product with ID sk.superwall.annual.89.99_7. Continue through the steps in this guide. However, when you're ready to add your own products to paywalls, follow our Products guide.

5. Presenting Your First Paywall

You're now ready to present your first paywall. Superwall is built on 3 core principles:

  • Events
  • Rules
  • Paywalls

When your app tracks an event, the SDK evaluates a rule to decide which paywall to show the user.

Events and Rules are grouped into a concept we call Campaigns.

Head to the Superwall dashboard. You'll see we have already set up an example paywall and campaign for you to get started. The campaign contains an event called campaign_trigger. You'll present your first paywall by tracking this event.

In Xcode, open your app's homepage view controller, add import SuperwallKit at the top, then add the following:

private func trackEvent() {
  Superwall.shared.track(event: "campaign_trigger") { paywallState in
    switch paywallState {
    case .presented(let paywallInfo):
      print("paywall info is", paywallInfo)
    case .dismissed(let paywallInfo, let dismissState):
      switch dismissState {
      case .purchased(let productId):
        print("The purchased product ID is", productId)
      case .closed:
        print("The paywall \(paywallInfo.identifier) was closed.")
      case .restored:
        print("The product was restored.")
    case .skipped(let reason):
      switch reason {
      case .holdout(let experiment):
        print("The user is in a holdout group, with id \(experiment.id) and group id \(experiment.groupId)")
      case .noRuleMatch:
        print("The user did not match any rules")
      case .eventNotFound:
        print("The event wasn't found in a campaign on the dashboard.")
      case .userIsSubscribed:
        print("The user is subscribed.")
      case .error(let error):
        print("Failed to present paywall. Consider a native paywall fallback", error)
-(void)trackEvent {
  [[Superwall sharedInstance] trackWithEvent:@"campaign_trigger" onSkip:^(enum SWKPaywallSkippedReason reason, NSError * _Nonnull error) {
    // Handle skipped paywall
  } onPresent:^(SWKPaywallInfo * _Nonnull paywallInfo) {
    // Handle paywall presentation
  } onDismiss:^(enum SWKDismissState dismissState, NSString * _Nullable productIdentifier, SWKPaywallInfo * _Nonnull paywallInfo) {
    // Handle paywall dismissal

This tracks campaign_trigger and handles state callbacks from the paywall. Now call trackEvent() from viewDidLoad() and build and run your app. Head to your app's homepage and you'll see the paywall present!


SwiftUI users

If you're using SwiftUI, you'll need to call this tracking code from a Button.

Note that the example paywall doesn't have any products added to it, so you won't be able to purchase anything just yet.

6. Creating a New Paywall From Template

Now you've confirmed your Superwall setup, you're ready to create a custom paywall that will load your products. Superwall maintains a growing list of paywall templates for you to choose from. Follow our Creating Paywalls guide to choose a template, add your products, and customize the text and design.

After you've done this, you can replace the example paywall in the example campaign. Then, build and run your app to see your new paywall in action! Follow RevenueCat's sandbox testing guide to test your purchases within your paywall.

7. Reading Our Docs to Learn More

Now you've got the basic setup within your app, it's time to personalise your Superwall experience. Take time to go through our docs in the side navigation menu to learn more about what you can do with Superwall.

Check out our example apps for a demonstration of our SDK in action and view our iOS SDK documentation.