Adds support for paywalls that include a free trial notification. After starting a free trial, the app checks whether the paywall should notify the user when their trial is about to end. If so, the user will be asked to enable notifications (if they haven't already) before scheduling a local notification. You can add a free trial notification to your paywall from the paywall editor.
Adds ability to use device.minutesSince_X, device.hoursSince_X, device.daysSince_X, device.monthsSince_X, and device.yearsSince_X in campaign rules and paywalls, where X is an event name. This can include Superwall events, such as app_open, or your own events.
Prints out the Superwall SDK version when the debug logLevel is enabled.
Adds removeAllPendingSuperwallNotificationRequests(), removeAllPendingNonSuperwallNotificationRequests(), removeAllDeliveredSuperwallNotifications(), and removeAllDeliveredNonSuperwallNotifications() to UNUserNotificationCenter. You can use these methods to remove your app's notifications without affecting Superwall's local notifications and vice-versa.
Updates RevenueCat to the latest version in our RevenueCat example app.
Fixes
Fixes a Core Data multi-threading issue when performing a count. If you had enabled Core Data multi-threading assertions in Xcode, this will have caused a crash.
Fixes very rare crash when purchasing without a PurchaseController.
Reduces reliance on Combine when using register to fix memory management crashes.
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
Enhancements
device.minutesSince_X
,device.hoursSince_X
,device.daysSince_X
,device.monthsSince_X
, anddevice.yearsSince_X
in campaign rules and paywalls, whereX
is an event name. This can include Superwall events, such asapp_open
, or your own events.debug
logLevel is enabled.removeAllPendingSuperwallNotificationRequests()
,removeAllPendingNonSuperwallNotificationRequests()
,removeAllDeliveredSuperwallNotifications()
, andremoveAllDeliveredNonSuperwallNotifications()
toUNUserNotificationCenter
. You can use these methods to remove your app's notifications without affecting Superwall's local notifications and vice-versa.Fixes
PurchaseController
.Checklist
CHANGELOG.md
for any breaking changes, enhancements, or bug fixes.swiftlint
in the main directory and fixed any issues.