Migrate Adapty iOS SDK to v. 3.15
If you use Paywall Builder in Observer mode, starting from iOS SDK 3.15, you need to implement a new method observerModeDidInitiateRestorePurchases(onStartRestore:onFinishRestore:). This method provides more control over the restore logic, allowing you to handle restore purchases in your custom flow. For complete implementation details, refer to Present Paywall Builder paywalls in Observer mode.
func observerMode(didInitiatePurchase product: AdaptyPaywallProduct,
onStartPurchase: @escaping () -> Void,
onFinishPurchase: @escaping () -> Void) {
// use the product object to handle the purchase
// use the onStartPurchase and onFinishPurchase callbacks to notify AdaptyUI about the process of the purchase
}
+ func observerModeDidInitiateRestorePurchases(onStartRestore: @escaping () -> Void,
+ onFinishRestore: @escaping () -> Void) {
+ // use the onStartRestore and onFinishRestore callbacks to notify AdaptyUI about the process of the restore
+ }