Migrar Adapty iOS SDK a la v. 3.15
Si usas Paywall Builder en modo Observer, a partir del iOS SDK 3.15 necesitas implementar un nuevo método observerModeDidInitiateRestorePurchases(onStartRestore:onFinishRestore:). Este método ofrece mayor control sobre la lógica de restauración, permitiéndote gestionar las restauraciones de compras en tu propio flujo personalizado. Para ver todos los detalles de implementación, consulta Presentar paywalls de Paywall Builder en modo Observer.
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
+ }