Changes the logLevel to be non-optional and introduces a none case to turn off logging.
Removes all guides from the SDK documentation. From now on, our online docs provide guides and the SDK documentation is only there as a technical reference.
Changes TrackResultObjc to PresentationResultObjc
Removes convenience methods for creating PaywallPresentationHandlers because they were a bit confusing
Changes the return type of PurchaseController.restorePurchases() from bool to RestorationResult
Enhancements
If you're using SwiftUI, you can now call Superwall.configure in the init() of your App file. This means you don't need to have a UIApplicationDelegate.
Prevents validation of restorations and purchases if you're using a PurchaseController - it's now all on you!
Updates Objective-C sample app to use Superwall.register and removes legacy StoreKit code.
Simplifies SwiftUI and RevenueCat example app.
You can now access device.subscriptionStatus in a rule, which is a string that's either ACTIVE, INACTIVE, or UNKNOWN.
You no longer need to have swiftlint installed to run our example apps.
If you're not using a PurchaseController and a user comes across the "You're already subscribed to this product" popup, we will now correctly identify this as a restoration and not a purchase. This can happen when testing in sandbox if you purchase a product -> delete and reinstall the app -> open a paywall and purchase.
Adds static variable Superwall.isInitialized which is true when initialization is complete and Superwall.shared can be accessed.
Adds transaction_abandon and transaction_fail as potential triggers. This comes with a new DismissState case closedForNextPaywall, which is returned when dismissing one paywall for another.
Fixes
Fixes issue where an invalid URL provided for an "Open URL" click behavior would result in a crash.
Exposes PaywallPresentationHandler as SWKPaywallPresentationHandler for Objective-C.
Checklist
[ ] All tests pass. Demo project builds and runs.
[ ] 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
logLevel
to be non-optional and introduces anone
case to turn off logging.TrackResultObjc
toPresentationResultObjc
PurchaseController.restorePurchases()
frombool
toRestorationResult
Enhancements
Superwall.configure
in theinit()
of yourApp
file. This means you don't need to have aUIApplicationDelegate
.PurchaseController
- it's now all on you!Superwall.register
and removes legacy StoreKit code.device.subscriptionStatus
in a rule, which is a string that's eitherACTIVE
,INACTIVE
, orUNKNOWN
.PurchaseController
and a user comes across the "You're already subscribed to this product" popup, we will now correctly identify this as a restoration and not a purchase. This can happen when testing in sandbox if you purchase a product -> delete and reinstall the app -> open a paywall and purchase.Superwall.isInitialized
which istrue
when initialization is complete andSuperwall.shared
can be accessed.transaction_abandon
andtransaction_fail
as potential triggers. This comes with a newDismissState
caseclosedForNextPaywall
, which is returned when dismissing one paywall for another.Fixes
PaywallPresentationHandler
asSWKPaywallPresentationHandler
for Objective-C.Checklist
CHANGELOG.md
for any breaking changes, enhancements, or bug fixes.swiftlint
in the main directory and fixed any issues.