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 SuperwallOptionlocaleIdentifier. You set this on configure.
setUserAttributes(_:) is now an async function. It always was async under the hood but this makes it more explicit and helps you avoid race conditions.
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.
Fixes issues with paywall product overrides.
Checklist
[x] All tests pass. Demo project builds and runs.
[x] I added tests, an experiment, or detailed why my change isn't tested.
[x] I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
[x] I have run swiftlint in the main directory and fixed any issues.
[ ] I have updated the SDK documentation as well as the online docs.
Changes in this pull request
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
andlatestPaywallInfo
no longer restricted to the main actor.localizationOverride(localeIdentifier:)
and replaces it with theSuperwallOption
localeIdentifier
. You set this on configure.setUserAttributes(_:)
is now an async function. It always was async under the hood but this makes it more explicit and helps you avoid race conditions.configure
. You now set the delegate viaSuperwall.shared.delegate
.presenter
introduced in beta 5.Enhancements
device.isSandbox
in rules.Fixes
Checklist
CHANGELOG.md
for any breaking changes, enhancements, or bug fixes.swiftlint
in the main directory and fixed any issues.