迁移 Adapty iOS SDK 至 v3.15
如果你在观察者模式下使用付费墙编辑工具,从 iOS SDK 3.15 开始,你需要实现一个新方法 observerModeDidInitiateRestorePurchases(onStartRestore:onFinishRestore:)。该方法为恢复逻辑提供了更精细的控制,让你可以在自定义流程中处理购买恢复操作。完整的实现细节,请参阅在观察者模式下展示付费墙编辑工具付费墙。
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
+ }