github superwall/Superwall-iOS 4.0.0-alpha.2

latest releases: 4.8.1, 4.8.0, 4.7.0...
pre-release8 months ago

Breaking Changes

  • Removes trigger_session_id from PaywallInfo params.
  • ProductInfo is renamed to Product and the old Product class no longer exists.
  • Removes Superwall.shared.subscriptionStatus in favor of entitlements.
  • Removes subscriptionStatus_didChange.
  • Removes subscriptionStatusDidChange(to:) from the SuperwallDelegate.
  • Renames productItems to products in PaywallInfo.
  • Renames register(event:) to register(placement:).
  • Renames preloadPaywalls(forEvents:) to preloadPaywalls(forPlacements:).
  • Renames getPaywall(forEvent:) to getPaywall(forPlacement:).
  • Renames getPresentationResult(forEvent:) to getPresentationResult(forPlacement:).
  • Renames the TriggerResult eventNotFound case to placementNotFound.
  • Renames the PresentationResult and PaywallSkippedReason noRuleMatch case to noAudienceMatch.
  • Moves ComputedPropertyRequestType to be a top-level type.
  • Renames Store to ProductStore.
  • Removes Superwall.shared.isConfigured in favor of Superwall.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. Note that when using Objective-C and providing a PurchaseController or using observer mode, the SDK will default to .storeKit1. If you're using the purchase function, you must use .storeKit1.
  • Changes the PurchaseController purchase function to func purchase(product: StoreProduct) async -> PurchaseResult. There will be an StoreKit 2 product accessible via product.sk2Product by default. However, if you're using the StoreKit 1 SuperwallOption or your app is running on an iOS version lower than iOS 15, this will be nil and you can access the StoreKit 1 product via product.sk1Product.
  • Consumables no longer count as lifetime subscriptions when using StoreKit 2.
  • Changes presented_by_event_name to presented_by_placement_name.
  • Renames the PurchaseResult case purchased(productId: String) to purchased(Product).
  • Changes the Swift onDismiss block of the PaywallPresentationHandler to accept both a PaywallInfo object and a PaywallResult object so you know which product was purchased after dismiss.
  • Changes the onRequestDismiss block of the PaywallView to accept both a PaywallInfo object and a PaywallResult object.
  • Changes the Objective-C onDismiss block of the PaywallPresentationHandler to accept both a PaywallInfo object, a PaywallResult object, and an optional StoreProduct, so you know which product was purchased after dismiss.
  • Renames LogScope case paywallTransactions to transactions.
  • Adds type to the transactionComplete placement.

Enhancements

  • Adds purchase(_:) support for both StoreKit 2 products and StoreProduct.
  • Adds Superwall.shared.entitlements. This is a published property of type EntitlementStatus. If you're using Combine or SwiftUI, you can listen to this to receive updates whenever it changes. Otherwise, you can use the SuperwallDelegate method entitlementStatusDidChange(from:to:). If you're not using a PurchaseController, we will handle the entitlements for you depending on what products the user purchases. However, if you're using a PurchaseControler, you can set the entitlement status, which can be .unknown, .inactive, or .active(Set<Entitlement>). You can also access all, active and inactive entitlements from the entitlements object.
  • Adds getStatus(), setUnknownStatus(), setInactiveStatus(), and setActiveStatus(with:) on Superwall.shared.entitlements for Objective-C users.
  • Tracks an entitlementStatus_didChange event whenever the entitlement status changes.
  • 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 the LogScope case entitlements.
  • Adds StoreKit 2 observer mode. This can be enabled by setting the SuperwallOptions shouldObservePurchases to true and storeKitVersion 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 StoreProducts for given product identifiers.

Don't miss a new Superwall-iOS release

NewReleases is sending notifications on new releases.