Removes isUserSubscribed() from the SuperwallDelegate and replaces this with a published instance variable subscriptionStatus. This is an 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:).
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.
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
isUserSubscribed()
from theSuperwallDelegate
and replaces this with a published instance variablesubscriptionStatus
. This is an enum that defaults to.unknown
on first install and the cached value on subsequent app opens. If you're using aSubscriptionController
to handle subscription-related logic, you must setsubscriptionStatus
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 ofsubscriptionStatusDidChange(to:)
.SubscriptionStatusDidChange
which is logged on the dashboard.presenter
parameter totrack
. In v2 this was known ason
. This takes aUIViewController
which is used to present the paywall.Checklist
CHANGELOG.md
for any breaking changes, enhancements, or bug fixes.swiftlint
in the main directory and fixed any issues.