Experimental Flags
Experimental flags are available to use in our SDK for features still in development.
Experimental flags in Superwall's SDK allow you to opt into features that are safe for production but are still being refined. These features may undergo naming changes or internal restructuring in future SDK versions. We expose them behind flags to give you early access while preserving flexibility for ongoing development.
These flags are configured via the SuperwallOptions
struct:
Available experimental flags
When these flags are enabled and the user runs your app, these values become available in campaign filters. Currently, these include:
Latest Subscription Period Type (String): Represents whether the user is in a trial, promotional, or a similar phase. Possible values include:
trial
code
subscription
promotional
winback
revoked
Represented as latestSubscriptionPeriodType
in campaign filters.
Latest Subscription State (String): Represents what state the actual subscription is in. Possible values include:
inGracePeriod
subscribed
expired
inBillingRetryPeriod
revoked
Represented as latestSubscriptionState
in campaign filters.
Latest Subscription Will Auto Renew (Bool):
If the user is set to renew or not. Either true
or false
Represented as latestSubscriptionWillAutoRenew
in campaign filters.
Detecting users who've cancelled an active trial
One common use case for these flags is detecting users who've cancelled an active trial. In that case, the filter in the campaign would check for latestSubscriptionWillAutoRenew
to be false
and latestSubscriptionPeriodType
to be trial
.
SDK Availability
These variables are currently only available on iOS, even in cross-platform environments like React Native, Flutter, and Expo. Support for Android is not yet available.
How is this guide?
Setting up StoreKit testing
(iOS only) StoreKit testing in Xcode is a local test environment for testing in-app purchases without requiring a connection to App Store servers. Set up in-app purchases in a local StoreKit configuration file in your Xcode project, or create a synced StoreKit configuration file in Xcode from your in-app purchase settings in App Store Connect. After you enable the configuration file, the test environment uses this local data on your paywalls when your app calls StoreKit APIs.
Products Not Loading
The full checklist for iOS, Android, and RevenueCat when your products won’t show.