You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The constructors of SDK-internal classes are now internal, because Superwall.configure builds them: AutomaticPurchaseController, TransactionManager, StoreManager, DeviceHelper, IdentityManager, LocalStorage, AppSessionManager, PaywallRequestManager, DeepLinkRouter, DebugManager, DebugView, TestMode and SWWebView. The public overload of SurveyManager.presentSurveyIfAvailable is removed, and ApiFactory.track no longer has a default body. None of these were documented API; configure the SDK with Superwall.configure and use Superwall.instance.
Enhancements
Adds LogScope.billing for the SDK's Google Play Billing logs. LogScope.storeKitManager is deprecated; setting it in SuperwallOptions.logging.scopes still enables the billing logs.
Fixes
Fixes purchases of custom store products from a paywall doing nothing. The paywall was never told the custom products' ids, so its purchase message had no product identifier and the SDK dropped it. Custom products are now sent to the paywall with their product identifier, and a purchase message without an identifier is resolved from the product's name on the paywall. A paywall message the SDK can't parse no longer drops the other messages sent with it.
Fixes the entitlements of a custom store product purchase (StoreProduct.isCustomProduct) not reaching the app until its next launch. After a successful custom purchase the SDK now asks Superwall for the user's entitlements in the background, as it already does after a Google Play purchase, so the entitlements your server reported for the purchase are picked up. It doesn't delay the purchase result or the paywall's dismissal. A background entitlements request whose user changed while it was in flight, after identify or reset, is now discarded instead of being applied to the new user.
Fixes transaction events for custom store products (StoreProduct.isCustomProduct) reporting store: "PLAY_STORE". They now report CUSTOM, so analytics no longer count purchases made through your own checkout as Google Play revenue.
Fixes no paywall opening for the rest of the session, with every register() failing with "Paywall Already Presented", after the paywall activity was finished while it was in the background. This happened when the app's task was cleared while the paywall was stopped, for example by opening a singleTask root activity from a deep link or notification. The paywall is now dismissed when its activity is finished in the background, and the handler gets onDismiss.
Fixes a misleading Error Evaluating JS error log, with java.lang.Exception: null, after every message the SDK posts to a paywall, such as a custom callback's result. Android reports a script's return value, and these scripts return nothing, so the log appeared even when the message was delivered. It is no longer logged in that case.
Fixes observer-mode purchases going untracked when SuperwallOptions.shouldObservePurchases is on and only one purchase is in progress. A completed purchase now tracks transaction_complete and refreshes the receipt, and a cancelled one tracks transaction_abandon; before, both were dropped with an error log. Observer-mode charts can show more transactions after this release.
Fixes observer-mode tracking stopping for the rest of the session when SuperwallOptions.shouldObservePurchases is on and Play reported a cancelled or failed purchase while no purchase was being observed. The purchase listener crashed on it; such results are now ignored.
Fixes trial reminders and other paywall notifications never being scheduled for a paywall embedded in the app's own Activity, such as one shown with PaywallComposable. Notifications were only scheduled when the paywall was shown in a SuperwallPaywallActivity or in-window; the SDK now asks the embedding Activity for the notification permission and schedules them there.
Fixes preloaded paywalls continuing to animate while off screen. A cached paywall's webview reported its page as visible, so its animations (Lottie, CSS, requestAnimationFrame) kept running unseen on the renderer thread every webview in the app shares, slowing the paywall on screen and the host app. A paywall is now paused once it has loaded while off screen, and resumed when it is presented.
Fixes CustomerInfo and entitlements naming the first configured base plan, with an expiry based on that plan's period, when a Google Play subscription has several base plans. The SDK now saves the product that was bought against its purchase token. When it can't know the plan, such as after a reinstall or for a purchase made before this fix, productId and latestProductId are the Play subscription ID and the expiry dates are null. Those users keep their access, and a plan that was recorded now also decides which entitlements the purchase unlocks.
Deprecations
Deprecates LogScope.storeKitManager in favour of LogScope.billing. Billing logs are now reported with the scope billing, so a SuperwallDelegate.handleLog implementation that matches the scope string "storeKitManager" should match "billing" instead.
Deprecates the unused iOS-port types com.superwall.sdk.billing.StoreProductType, StoreKit, StoreKitManagerInterface, ProductPurchaser, TransactionRestorer, Purchasing and TransactionVerifierFactory. They will be removed in a future release. GetProductsResponse is unchanged.