gradient blur

Integrating Superwall in your iOS app

If you've got just under 10 minutes free, I'll get you up and running with our testable paywalls.

Header for iOS Indie App

Jordan Morgan

Developer Advocate

Published

Want to deploy testable paywalls without submitting updates? Or, run several paywall designs concurrently? Superwall has you covered, let's see how.

Getting up and running with Superwall is a quick, three step process. As someone who has used countless SDKs, I know that sometimes you simply want a to-the-point walk through of how to get started. If that’s you, you're in the right place.

Today, I’m going to take you through those three steps — beginning to end. In a fictional caffeine tracking app, we'll present a paywall when someone taps the blue button to log caffeine. Here's where we'll end up:

gradient blur
dashboard-header

Paywall Presentation in Indie iOS App

To get there, we’ll need to do the following:

  1. Install the Superwall SDK.

  2. Configure the SDK in our app.

  3. Present a paywall by registering a placement.

Before we get started, I want to point out that this quick start guide does assume two things:

  1. That you’ve already setup your subscriptions in App Store Connect and Superwall.

  2. You have a Superwall account.

If you aren't there yet, no worries! Sign up for a free account (you can do that at the bottom of this post), and then follow our guide to setup products. Also, if you'd like to see a sample app with our SDK fully integrated, check out our sample projects.

First up, let’s get Superwall into your app!

Step One: Install the SDK

You can install our SDK using two different methods. We support Swift Package Manager and Cocoapods. I'll show you how to do both below (we also have a video over it you can watch here).

Using Swift Package Manager:

  1. In Xcode, choose File -> Add Package Dependencies....

  2. In the new window, paste this into the search bar you’ll see at the top right: https://github.com/superwall-me/Superwall-iOS.

  3. Select Superwall-iOS, and set the dependency rule as Up To Next Major Version, and the minimum version to 3.4.8.

  4. Click Add Package.

  5. Make sure your app is selected on the left hand side under Add to Target. Click Add Package again.

Using Cocoapods:

  1. Ensure your project is setup with Cocoapods first (i.e. you have a podfile already). If you don’t - check out their guide here.

  2. In your podfile, add Superwall: pod 'SuperwallKit', '< 4.0.0'.

  3. Then, open Terminal and navigate to the location of your podfile ( $cd documents/my-awesome-project).

  4. Run pod repo update to make sure your local spec repo is up to date.

  5. Run pod install and you’re all set!

At this point, no matter if you used Swift Package Manager or Cocoapods, Superwall’s SDK should be in your project. Take a minute to make sure everything is building just fine. If you’ve hit a snag, don’t hesitate to ask me for help.

Step Two: Configure Superwall

Next, we’re going to setup Superwall in our app. We want to initialize Superwall early on in your app’s life cycle. Here are some recommended approaches:

  • In UIKit , use application(_:didFinishLaunchingWithOptions:) inside your application delegate.

  • For SwiftUI , use the init of your Struct conforming to the App protocol works.

Getting Superwall ready is as easy as calling one function and passing in your API key. If you don’t know your API key, you can find yours in the Superwall dashboard under Settings->Keys->Public API Key.

From there, calling configure(apiKey:) is all that we have to do:

import SwiftUI
import SuperwallKit

@main
struct MyApp: App {

    init() {
        // Use your own API key here
        Superwall.configure(apiKey: "YOUR_API_KEY")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

swift

ungroup Copy

Now, we can interact with Superwall to show paywalls and more. Out of the box, we’ll handle all of the basic subscription-based logic for you. However, if you need fine grain control or want to use an existing service such as Revenue Cat, we support that too. Check out how to use our PurchaseController here.

Step Three: Present a Paywall

Now comes the fun part - presenting a paywall!

With Superwall, we can certainly show a paywall arbitrarily, from a button tap or anything else. But, I want to quickly explain the methodologies behind our SDK.

With Superwall, paywalls are typically shown based off of placements you create for a given campaign. Each campaign corresponds to one (or several!) paywalls. At its core, a placement is anything in your app that might merit being a paid feature, otherwise known as being ‘paywalled”. For example, in a caffeine tracking app, some placements might be:

  1. When a user logs caffeine, caffeineLogged .

  2. Or, possibly setting a custom icon, customIconSelected.

This approach is incredibly flexible, because now we can do things dynamically — such as paywalling a particular feature. Continuing our example, if entering in caffeine should be a pro feature - Superwall can ensure a paywall is shown for non-pro users when they attempt to do some logging. If they are pro, we'll simply log the caffeine:

Button("Log") {
    Superwall.shared.register(event: "caffeineLogged") {
        store.log(amountToLog)
    }
}

swift

ungroup Copy

If you've followed our Caffeine Pal project from our StoreKit 2 post, you might notice how the logic has become even simpler to paywall features now. Here's what what we did using traditional methods, without Superwall:

Button("Log") {
    if storefront.hasCaffeinePalPro {
        store.log(amountToLog)
    } else {
        showPaywall.toggle()
    }
}

swift

ungroup Copy

Out of the box, we provide a campaign with a corresponding placement ( campaign_trigger) to test things out. You can use that for demonstration purposes. However, it's best practice to get your campaigns up and running early — so I would advise setting up a placement that you'll actually use (even when in the testing phase).

Finishing Up

In just a few steps, we’ve installed Superwall and presented a remotely configurable paywall. But, cliché as it sounds, that’s just the start of what you can do. Want to dig in further? Check these links out:

  1. A demo app using Superwall alongside RevenueCat.

  2. Learn how to preview paywalls before going live.

  3. Performing in-app actions from button taps in your paywalls.

  4. Or, visit our documentation or YouTube channel to learn more!

If you got stuck along the way or have any other questions or feedback, reach out to me on Twitter! I'm more than happy to help, and all of us at Superwall are excited to see what you can do with our SDK.

gradient blur

Get a demo

We'd love to show you Superwall

Want to learn more?

  1. Fill out this tiny form →
  2. We'll prepare you a custom demo
  3. Walk you through Superwall
  4. Follow up and answer questions

Key features

  • Drag 'n Drop Paywalls
  • 200+ Custom Templates
  • Unlimited A/B tests
  • Surveys, Charts & More
Select...

By proceeding you consent to receiving emails and our terms.

gradient blur
shape-starshape-starshape-starshape-starshape-star

Customer Stories

Our customers refer to Superwall as their most impactful monetization tool. In their own words:

dashboard-header

Thanks to Superwall, we were able to 2x our iOS app profitability in just six months. It has greatly assisted our growth team in achieving exceptional results by facilitating high-frequency experimentation.

Mojo launch
Bernard Bontemps, Head of Growth
dashboard-header

Really excited about the progress we made recently on paywalls with Superwall. We got more than 50% increase in conversion for upsell screens. This is crazy.

Photoroom launch
Matthieu Rouif, CEO
dashboard-header

Superwall has completely changed the game for us. We’re able to run experiments 10x faster and unlock the ideal monetization model for our users.

RapChat launch
Seth Miller, CEO
dashboard-header

Superwall made testing paywalls so much faster. Instead of releasing a new version of the app each time, we were able to iterate on the winning paywalls much quicker. Thanks to that it increased our revenue per customer by 40%.

Teleprompter launch
Mate Kovacs, Indie Dev
dashboard-header

Superwall lets us move 10x faster on our monetization strategy. We can build and launch multiple paywall iterations without the need for client releases or complicated deploys. Our product iteration loop is days, rather than months because of Superwall.

Citizen launch
Jon Rhome, Head of Product
dashboard-header

Superwall enables Bickster’s marketing team to design and optimize app paywalls, freeing up engineering to concentrate on innovation. As a result, Superwall helped accelerate our install-to-subscription rates, lower engineering expenses, and cured our team’s frustration with the (once) time-consuming process of iterating on paywalls.

Bickster launch
Chris Bick, CEO
dashboard-header

Superwall has revolutionized our monetization strategy. It’s an essential tool that allows rapid paywall testing and optimization, leading to remarkable improvements in our subscription conversions and revenue generation. Can’t recommend Superwall enough for any app-based business.

Coinstats launch
Vahe Baghdasaryan, Sr. Growth
dashboard-header

Superwall has played an integral part of improving our subscription business. Compared to other providers, Superwall has proven superior in facilitating high-frequency experimentation allowing us to achieve an ideal monetization model, resulting in a significant increase in revenue.

Hornet launch
Nils Breitmar, Head of Growth
dashboard-header

Superwall is the single greatest tool we’ve used to help us increase our revenue. Our material wins from Superwall are greater than any tool we’ve worked with to date!

Pixite launch
Jordan Gaphni, Head of Growth
dashboard-header

Shout out to Superwall for helping us dial in our paywall — made a big impact on monetization, increasing revenue by more than 50% 💸

Polycam launch
Chris Heinrich, CEO
dashboard-header

Superwall increases revenue. Full stop. Being able to test paywalls on the fly and quickly analyze results has drastically increased our revenue and improved our monetization of users. Highly recommend this tool!

Hashtag Expert launch
Zach Shakked, Founder
Start for FREE

Simple win-win pricing

Interest aligned pricing. Contact us for a discount.

dashboard-header
Indie
Free
Up to 250 conversions per month
Access to every standard feature
Try it free

Standard Features

  • 250 Conversions a Month
  • Drag 'n Drop Paywall Editor
  • 200+ Paywall Templates
  • Unlimited A/B tests
  • Charts & Analytics
dashboard-header
Startup
$0.20/conversion
Pay as you go pricing that scales
Up to 5,000 conversions a month
Sign Up

Standard Features

  • 5,000 Conversions a Month
  • Drag 'n Drop Paywall Editor
  • 200+ Paywall Templates
  • Unlimited A/B tests
  • Charts & Analytics
dashboard-header
Growth
Flat-Rate
100% custom flat-rate pricing
Terms that make sense for you
Get a quote

Premium Features

  • Unlimited Conversions
  • We Build Your Paywalls
  • 4 Weekly Growth Meetings
  • Dedicated Slack Channel
  • Custom Integrations