gradient blur

Handling Connectivity Interruptions with Superwall

Sometimes, people encounter spotty network conditions or lose it altogether. Here's how Superwall's SDK was built to handle it.

Jordan Morgan

Developer Advocate

Published

Most of the time, people have a fairly strong network connection. Most of the time. What do you do about the other times, though?

Here, we'll lay out some fundamental approaches to handling those situations, and explain how the Superwall SDK was designed to function under them.

How Superwall handles poor connectivity

Even under poor network condition, the Superwall SDK ensures that your app remains functional. Our SDK is largely powered via a configuration object that is fetched from our servers, which contains all sorts of useful information about your paywalls, products and more.

In the event of a dropped connection, Superwall tries to fetch the configuration again. During those times, you'll likely want to know how:

  • Superwall handles subscription state.

  • And, how you should handle paywall presentation.

Let's start with the user's subscription status. If a user is actively subscribed and the SDK has previously fetched or cached the configuration — then paywalls will still present as expected.

However, if the configuration can’t be retrieved due to a lack of connection, Superwall will attempt to fetch it again after one second. If still unsuccessful, the SDK tracks a timeout event, triggers the onSkip handler with the reason userIsSubscribed and then proceeds with the designated feature block or closure:

let handler = PaywallPresentationHandler()
handler.onSkip { reason in
    // Reason will be `userIsSubscribed`
}

Superwall.shared.register(event: "caffeineLogged", handler: handler) {
    // And this block will be fired
    store.log(amountToLog)
}

swift

ungroup Copy

For users without an active subscription, Superwall takes a different approach.

The SDK will retry the network calls for up to one minute in an effort to retrieve the configuration. If the connection is still unavailable after this period, it'll invoke the onError handler with an error code of noConfig:

let handler = PaywallPresentationHandler()

// After timeout was unsuccessful and a paywall is presented
// We'll hit `onError`
handler.onError { error in
    // Error will indicate there is no configuration
}
Superwall.shared.register(event: "caffeineLogged", handler: handler) {
    // This will *not* be fired
    store.log(amountToLog)
}

swift

ungroup Copy

Given this information, you may be wondering if there is a time to fallback and use your own native paywall. In short, yes - there are cases where you might consider it. Specifically, for error codes 103, 104 and 106:

  • Code 103: This means there was no UIViewController (or platform equivalent) to present a paywall from.

  • Code 104: Here, Superwall couldn't fetch its configuration. Superwall's CDN could be having issues, or more likely — there is no internet connection.

  • Code 107: The paywall was unavailable to present.

  • Code 106: Finally, this error indicates the webview failed to load.

For example, on iOS the onError handler can be cast to NSError, allowing you to check for these error codes. When present, consider presenting your own paywall. Also, if you need to get a quick native paywall going on iOS, check out our primer on creating basic paywalls up using StoreKit Views.

Fortunately, it's rare that you'll encounter these issues in production often. But at Superwall, we know that connections can and do drop, and hitting an error is going to happen at some point. We've built and designed these mechanisms to keep your app running smoothly when they do.

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