gpt4 book ai didi

ios - 更新后不调用 SKPaymentQueue updatedTransactions 方法

转载 作者:可可西里 更新时间:2023-11-01 02:01:58 26 4
gpt4 key购买 nike

我已经在我的应用中实现了自动续订订阅。一切正常。唯一的问题是方法 public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) 在自动续订发生后没有被调用,因为它应该根据文档通知我订阅是更新。它仅在我调用 SKPaymentQueue.default().restoreCompletedTransactions()

时调用

我知道它只会自动续订 5 次,而且我必须创建新的沙箱用户并且我尝试了几次。

在我的 AppDelegate 中,我调用了 SKPaymentQueue.default().add(self) 方法。

有什么想法吗?

最佳答案

After a subscription is successfully renewed, StoreKit adds a transaction for the renewal to the transaction queue. Your app checks the transaction queue on launch and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews, the transaction observer is not called; your app finds out about the renewal the next time the app is launched.

来源In-App Purchase Programming Guide: Working with Subscriptions

关于ios - 更新后不调用 SKPaymentQueue updatedTransactions 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45624717/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com