Breaking Changes
- Removes
trigger_session_id
fromPaywallInfo
params. ProductInfo
is renamed toProduct
and the oldProduct
class no longer exists.- Renames
subscriptionStatusDidChange(to:)
tosubscriptionStatusDidChange(to:from:)
in theSuperwallDelegate
. - Renames
productItems
toproducts
inPaywallInfo
. - Renames
register(event:)
toregister(placement:)
. - Renames
preloadPaywalls(forEvents:)
topreloadPaywalls(forPlacements:)
. - Renames
PaywallView(event:)
toPaywallView(placement:)
. - Renames
getPaywall(forEvent:)
togetPaywall(forPlacement:)
. - Renames
getPresentationResult(forEvent:)
togetPresentationResult(forPlacement:)
. - Renames the
TriggerResult
,PresentationResult
andPaywallSkippedReason
eventNotFound
case toplacementNotFound
andnoEventMatch
tonoAudienceMatch
. - Renames
handleSuperwallEvent(withInfo:)
to `handleSuperwallPlacement(withInfo:). - Moves
ComputedPropertyRequestType
to be a top-level type. - Renames
Store
toProductStore
. - Removes
Superwall.shared.isConfigured
in favor ofSuperwall.shared.configurationStatus
. - Defaults to StoreKit 2 for product purchasing for apps running on iOS 15+. You can change this back to StoreKit 1 by setting the
SuperwallOption
storeKitVersion
to.storeKit1
. When using Objective-C and providing a PurchaseController or using observer mode, the SDK will default to.storeKit1
. If you're using Objective-C and usingpurchase(_:)
, you must use.storeKit1
. - Changes the
PurchaseController
purchase function tofunc purchase(product: StoreProduct) async -> PurchaseResult
. There will be an StoreKit 2 product accessible viaproduct.sk2Product
by default. However, if you're using the StoreKit 1SuperwallOption
or your app is running on an iOS version lower than iOS 15, this will benil
and you can access the StoreKit 1 product viaproduct.sk1Product
. - Consumables no longer count as lifetime subscriptions when using StoreKit 2.
- Renames the
PurchaseResult
casepurchased(productId: String)
topurchased(Product)
. - Changes the Swift
onDismiss
block of thePaywallPresentationHandler
to accept both aPaywallInfo
object and aPaywallResult
object so you know which product was purchased after dismiss. - Changes the
onRequestDismiss
block of thePaywallView
to accept both aPaywallInfo
object and aPaywallResult
object. - Changes the Objective-C
onDismiss
block of thePaywallPresentationHandler
to accept both aPaywallInfo
object, aPaywallResult
object, and an optionalStoreProduct
, so you know which product was purchased after dismiss. - Renames
LogScope
casepaywallTransactions
totransactions
. - Adds
type
to thetransactionComplete
placement. - Removes the
restored
result fromPurchaseResult
.
Enhancements
- Adds
purchase(_:)
support for both StoreKit 2 products andStoreProduct
. - Adds
Superwall.shared.subscriptionStatus.isActive
as a convenience variable. - Adds entitlements as associated values to the
active
case ofSuperwall.shared.subscriptionStatus
. If you're not using aPurchaseController
, we will handle the entitlements for you depending on what products the user purchases. - Adds
Superwall.shared.entitlements
which has the following properties:all
,active
andinactive
. - Adds
setUnknownSubscriptionStatus()
,setInactiveSubscriptionStatus()
, andsetActiveSubscriptionStatus(with:)
for Objective-C users. - Updates the example apps. We now have Basic and Advanced. Basic is a simple plug-and-play superwall setup that doesn't use entitlements. Advanced uses entitlements and has three possible ways of configuring Superwall: 1. Letting Superwall manage everything, 2. Using a purchase controller with StoreKit, 2. Using a purchase controller with RevenueCat.
- Uses
Superscript
for all audience filter evaluations. This is our in-house package that uses Google's Common Expression Language to evaluate audience filters. It allows for complex expressions within the audience filter builder. - Adds StoreKit 2 observer mode. This can be enabled by setting the
SuperwallOptions
shouldObservePurchases
totrue
andstoreKitVersion
to.storeKit2
(which is the default value). Note that this is only available with apps running iOS 17.2+. - Adds
products(for:)
which gets the ``StoreProduct`s for given product identifiers.
Please see our migration guide and docs for a full breakdown of what's new.