Skip to content

Releases: superwall/Superwall-iOS

3.0.0-rc.2

11 Apr 12:26
Compare
Choose a tag to compare

Enhancements

  • Simplifies Superwall-UIKit-Swift exmaple project

Fixes

  • Fixes bug where calling Superwall.shared prior to Superwall.configure would result in a recursive loop

3.0.0-rc.1

28 Mar 02:35
Compare
Choose a tag to compare

Breaking Changes

  • Adds PaywallInfo to SuperwallDelegate methods paywallWillPresent(withInfo:), paywallDidPresent(withInfo:), paywallWillDismiss(withInfo:) and paywallDidDismiss(withInfo:).
  • Renames SuperwallDelegate method didTrackSuperwallEventInfo(_:SuperwallEventInfo) to handleSuperwallEvent(withInfo eventInfo: SuperwallEventInfo) for clarity
  • Renames SuperwallDelegate methods willOpenURL(url:) and willOpenDeepLink(url:) to paywallWillOpenURL(url:) and paywallWillOpenDeepLink(url:) respectively
  • Decouples associated value of .dismissed in Superwall.shared.track() closure to PaywallInfo and DismissState.
  • Changes subscription_status_did_change to subscriptionStatus_didChange.
  • Renames TrackResult to PresentationResult

Enhancements

  • Introducing Superwall.shared.register(event:params:handler:feature), Superwall's most powerful feature yet. Wrap your features with this method to conditionally show paywalls, lock features and more.
  • Adds a drawer display option which displays the paywall at 70% screen height on iOS 16 iPhones.
  • Adds warning if setting subscription status without passing through a PurchaseController during config.
  • Adds $is_feature_gatable standard property to register and track calls
  • Cleans up and reformats SDK logs

Fixes

  • Fixes a long term bug where tracking an event to show a paywall and tracking an event that results in noRuleMatch would interfere with each other and cause the trigger session to be set to nil. This resulted in some paywall data being incorrect on the dashboard.

3.0.0-beta.8

14 Mar 18:24
f7d0bf6
Compare
Choose a tag to compare

Enhancements

  • Prevents the tracking of events that have the same name as internally tracked SuperwallEvents like paywall_open.

Fixes

  • Fixes an issue with reporting in the dashboard due to a mismatch of keys between client and server.

3.0.0-beta.7

09 Mar 18:00
58f17de
Compare
Choose a tag to compare

Breaking Changes

  • Changes Objective-C method getTrackInfo to getTrackResult to be in line with the Swift API.
  • Removes the error case from the TrackResult and adds in userIsSubscribed and paywallNotAvailable cases.
  • Moves main actor conformance to functions of PurchaseController protocol rather than the whole protocol.
  • Changes Objective-C method setUserAttributesDictionary(_:) to setUserAttributes(_:).

Fixes

  • Makes NetworkEnvironment Objective-C compatible.
  • Fixes an issue where a manually dismissed modally presented paywall wouldn't properly dismiss.
  • Fixes race condition when calling identify and tracking a paywall.

3.0.0-beta.6

01 Mar 17:37
ef4e17b
Compare
Choose a tag to compare

Breaking Changes

  • identify(userId:) is not longer a throwing async function. Any error that occurs is logged.
  • reset is no longer an async function.
  • presentedViewController and latestPaywallInfo no longer restricted to the main actor.
  • Removes localizationOverride(localeIdentifier:) and replaces it with the SuperwallOption localeIdentifier. You set this on configure.
  • Removes delegate from configure. You now set the delegate via Superwall.shared.delegate.
  • Removes presenter introduced in beta 5.
  • Removes ASN1Swift as a package dependency.
  • Changes free trial logic. Previously we'd look at just the primary product. However, we determing free trial eligibility based on the first product in the paywall that has a free trial available.

Enhancements

  • You can now target device.isSandbox in rules.

Fixes

  • Fixes bug where calling identify and immediately tracking a paywall would result in an error if it happened before configure returned.
  • Fixes compiler bug when calling track.
  • Tweaks the loading indicator.
  • Fixes removing an attribute using Objective-C.
  • Fixes issues where some functions tagged for the main actor weren't actually running on the main actor in objc.
  • Fixes issues with paywall product overrides.

3.0.0-beta.5

14 Feb 16:12
7a3c891
Compare
Choose a tag to compare

Breaking Changes

  • Changes SubscriptionController to PurchaseController. You now set this in Superwall.shared.configure, rather than via the delegate.
  • Removes isUserSubscribed() from the SuperwallDelegate and replaces this with a published instance variable subscriptionStatus. This is enum that defaults to .unknown on first install and the cached value on subsequent app opens. If you're using a SubscriptionController to handle subscription-related logic, you must set subscriptionStatus every time the user's subscription status changes. If you're letting Superwall handle subscription-related logic, this value will be updated with the device receipt.
  • hasActiveSubscriptionDidChange(to:) is replaced in favour of subscriptionStatusDidChange(to:).
  • Makes Superwall.shared.options internal so that options must be set in configure.

Enhancements

  • Adds a new event SubscriptionStatusDidChange which is logged on the dashboard.
  • Adds an optional presenter parameter to track. In v2 this was known as on. This takes a UIViewController which is used to present the paywall.

3.0.0-beta.4

03 Feb 16:07
2731f75
Compare
Choose a tag to compare

Breaking Changes

  • Moves back to using Superwall.shared.identify(userId: userId) and reset() instead of logIn/createAccount/logout/reset. This is so that it's easier for integration. However, you can now pass an IdentityOptions object to identify(userId:options). This should only be used in advanced use cases. By setting the restorePaywallAssignments property of IdentityOptions to true, it prevents paywalls from showing until after paywall assignments have been restored. If you expect users of your app to switch accounts or delete/reinstall a lot, you'd set this when identifying an existing account.

Enhancements

  • Adds hasActiveSubscriptionDidChange(to:) delegate function. If you're letting Superwall handle subscription logic you can use this to receive a callback whenever the user's internal subscription status changes. You can also listen to the published hasActiveSubscription variable.
  • Adds a completion handler to Superwall.configure(...) that lets you know when Superwall has finished configuring. You can also listen to the published isConfigured variable.
  • If you let Superwall handle your subscription-related logic, we now assume that a non-consumable product on your paywall is a lifetime subscription. If not, you'll need to return a SubscriptionController from the delegate.
  • handleDeepLink(_:) now returns a discardable Bool indicating whether the deep link was handled. If you're using application(_:open:options:) you can return its value there.
  • Adds togglePaywallSpinner(isHidden:) to arbitrarily toggle the loading spinner on and off. This is particularly useful when you're doing async work when performing a custom action in handleCustomPaywallAction(withName:).

Fixes

  • Fixes occasional thread safety related crash when loading products.
  • Reverts an issue from the last beta where the paywall spinner would move up before the payment sheet appeared.

3.0.0-beta.3

28 Jan 19:14
62c2ba2
Compare
Choose a tag to compare

Fixes

  • Fixes potential crash due to a using a lazy variable.

3.0.0-beta.2

27 Jan 18:58
d1ff196
Compare
Choose a tag to compare

Breaking Changes

  • Moves all functions and variables to the shared instance for consistency, e.g. it's now Superwall.shared.track() instead of Superwall.track().

Enhancements

  • Readds Superwall.shared.logLevel as a top level static convenience variable so you can easily change the log level.
  • Adds isLoggedIn to user properties, which means you can create a rule based on whether the user is logged in vs. whether they're anonymous.

Fixes

  • Fixes bug in <iOS 14 where the spinner wasn't appearing when transacting.
  • Fixes bug where PaywallOverrides weren't being passed in to the paywall.
  • Fixes bug where purchasing, deleting then reinstalling your app, and tapping a purchase button would throw an error.
  • Fixes an rare crash associated with the loading and saving of Core Data.

3.0.0-beta.1

24 Jan 10:41
Compare
Choose a tag to compare

This is the first beta for SuperwallKit, the framework formally known as Paywall!

When out of beta, this will be a major release, containing lots of breaking changes, enhancements and some bug fixes.

We understand that transitions between major SDK releases can become frustrating, so we've made a migration guide to make your life easier. We've also updated out sample apps to v3, including RevenueCat+SuperwallKit and Objective-C apps. For new users, we've created a Quick Start Guide to get up and running in no time. Finally, we recommend you check out our updated docs.

Breaking Changes

  • Renames the package from Paywall to SuperwallKit.
  • Renames the primary static class for integrating Superwall from Paywall to Superwall.
  • Sets the minimum iOS version to iOS 13.
  • Renames preloadPaywalls(forTriggers:) to preloadPaywalls(forEvents:)
  • Renames configure(apiKey:userId:delegate:options:) to configure(apiKey:delegate:options:). This means you no longer provide a userId with configure. Instead you must use the new identity API detailed below.
  • Changes PaywallOptions to SuperwallOptions. This now clearly defines which of the options are explicit to paywalls vs other configuration options within the SDK.
  • Renames Superwall.trigger(event:) to Superwall.track(event:). We found that having separate implicit (Superwall.track(event:)) and explicit (Superwall.trigger(event:)) trigger functions caused confusion. So from now on, you'll just use Superwall.track(event:) for all events within your app.
  • Renames Paywall.EventName to SuperwallEvent and removes .manualPresent as a SuperwallEvent.
  • Renames PaywallDelegate to SuperwallDelegate.
  • Superwall automatically handles all subscription-related logic, meaning that it's no longer a requirement to implement any of the delegate methods. Note that if you're using RevenueCat, you will still need to use the delegate methods. This is because the Superwall-handled subscription status is App Store account-specific, whereas RevenueCat is logged in user-specific. If this isn't a problem, you can just set RevenueCat in observer mode and we'll take care of the rest :)
  • Moves purchasing logic from the delegate into a protocol called SubscriptionController. You return your SubscriptionController from the delegate method subscriptionController().
  • For Swift users, this changes the SubscriptionController method purchase(product:) to an async function that returns a PurchaseResult. Here, you need to return the result of the user attempting to purchase a product, making sure you handle all cases of PurchaseResult: .purchased, .cancelled, .pending, failed(Error).
  • For Objective-C users, this changes the delegate method purchase(product:) to purchase(product:completion:). You call the completion block with the result of the user attempting to purchase a product, making sure you handle all cases of PurchaseResultObjc: .purchased, .cancelled, .pending, failed. When you have a purchasing error, you need to call the completion block with the .failed case along with the error.
  • Changes restorePurchases() to an async function that returns a boolean instead of having a completion block.
  • Removes identify(userId:) in favor of the new Identity API detailed below.
  • Removes Paywall.load(identifier:). This was being used to preload a paywall by identifier.
  • Removes .triggerPaywall() for SwiftUI apps. Instead, SwiftUI users should now use the UIKit function Superwall.track(). Take a look at our SwiftUI example app to see how that works.
  • Changes the period and periodly attributes for 2, 3 and 6 month products. Previously, the period would be "month", and the periodly would be "monthly" for all three. Now the period returns "2 months", "quarter", "6 months" and the periodly returns "every 2 months", "quarterly", and "every 6 months".

Enhancements

  • New identity API:
    • logIn(userId:): Logs in a user with their userId to retrieve paywalls that they've been assigned to.
    • createAccount(userId:): Creates an account with Superwall. This links a userId to Superwall's automatically generated alias.
    • logOut(userId:): Logs out the user, which resets on-device paywall assignments and the userId stored by Superwall.
    • reset(): Resets the userId, on-device paywall assignments, and data stored by Superwall. This can be called even if the user isn't logged in.
  • The identity API can be accessed using async/await or completion handlers.
  • New function Superwall.publisher(forEvent:params:overrides) which returns a PaywallStatePublisher (AnyPublisher<PaywallState, Never>) for those Combine lovers. By subscribing to this publisher, you can receive state updates of your paywall. We've updated our sample apps to show you how to use that.
  • Adds Superwall.isLoggedIn to check whether the user is logged in to the SDK or not. This will be true if you've previously called logIn(userId:) or createAccount(userId:).
  • Adds a new example app, UIKit+RevenueCat, which shows you how to use Superwall with RevenueCat.
  • Adds a new Objective-C example app UIKit-Objc.
  • Adds an Objective-C-only function removeUserAttributes(_:) to remove user attributes. In Swift, to remove attributes you can pass in nil for a specific attribute in setUserAttributes(_:).
  • Adds getTrackResult(forEvent:params:). This returns a TrackResult which tells you the result of tracking an event, without actually tracking it. This is useful if you want to figure out whether a paywall will show in the future.
  • Logs when products fail to load with a link to help diagnose the cause.
  • Adds a published property hasActiveSubscription, which you can check to determine whether Superwall detects an active subscription. Its value is stored on disk and synced with the active purchases on device. If you're using Combine or SwiftUI, you can subscribe or bind to this to get notified whenever the user's subscription status changes. If you're implementing your own SubscriptionController, you should rely on your own logic to determine subscription status.
  • Adds a published property isConfigured. This is a boolean which you can use to check whether Superwall is configured and ready to present paywalls.
  • Adds isFreeTrialAvailable to PaywallInfo.
  • Tracks whenever the paywall isn't presented for easier debugging.

Fixes

  • Fixes a caching issue where the paywall was still showing in free trial mode when it shouldn't have. This was happening if you had purchased a free trial, let it expire, then reopened the paywall. Note that in Sandbox environments this issue may still occur due to introductory offers not being added to a receipt until after a purchase.
  • The API uses background threads wherever possible, dispatching to the main thread only when necessary and when returning from completion blocks.
  • The API is now fully compatible with Objective-C.
  • Setting the PaywallOption automaticallyDismiss to false now keeps the loading indicator visible after restoring and successfully purchasing until you manually dismiss the paywall.
  • Improves the speed of requests by changing the cache policy of requests to our servers.
  • Fixes session_start, app_launch and first_seen not being tracked if the SDK was initialised a few seconds after app launch.
  • Stops the unnecessary retemplating of paywall variables when coming back to the paywall after visiting a link via the in-app browser.
  • Removes the transaction timeout popup. This was causing a raft of issues so we now rely on overlayTimeout to cancel the transaction flow.