Migrer le SDK iOS Adapty vers la v3.15
Si vous utilisez le Paywall Builder en mode Observer, à partir du SDK iOS 3.15, vous devez implémenter une nouvelle méthode observerModeDidInitiateRestorePurchases(onStartRestore:onFinishRestore:). Cette méthode offre un meilleur contrôle sur la logique de restauration, vous permettant de gérer les restaurations d’achats dans votre flow personnalisé. Pour tous les détails d’implémentation, consultez Afficher les paywalls du Paywall Builder en mode 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
+ }