---
title: "Migrate Adapty iOS SDK to v3.15"
description: "Migrate to Adapty iOS SDK v3.15 for better performance and new monetization features."
---

Nếu bạn đang dùng [Paywall Builder](adapty-paywall-builder) trong [Observer mode](observer-vs-full-mode), bắt đầu từ iOS SDK 3.15, bạn cần triển khai một phương thức mới là `observerModeDidInitiateRestorePurchases(onStartRestore:onFinishRestore:)`. Phương thức này cung cấp khả năng kiểm soát chi tiết hơn đối với logic khôi phục, cho phép bạn xử lý việc khôi phục giao dịch mua trong flow tùy chỉnh của mình. Để biết chi tiết triển khai đầy đủ, tham khảo [Hiển thị paywall Paywall Builder trong Observer mode](ios-present-paywall-builder-paywalls-in-observer-mode).

```diff showLineNumbers
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
+ }
```