gpt4 book ai didi

ios - 是否测试沙盒自动更新订阅 IOS?

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

我一直致力于实现一个自动续订订阅应用程序。我实际购买的订阅工作正常......我选择 1 个月的订阅,它应该在到期前持续 3 分钟......最初的购买实际上工作正常......但 3 分钟后它过期了,我再也看不到了自动续订发生或获得新收据或任何东西,所以应用程序正确地只是说..走开....

文档说它应该自动续订 5 次才能自动取消,但我似乎从未在首次购买后收到新收据或任何东西。

是否有我应该查看或检查的东西/其他地方?我错过了什么吗?

最佳答案

Sandbox 用户订阅会自动续订,但时间较短 - 它会每隔几分钟续订一次。

For the sake of testing, there are some differences in behavior between auto-renewable subscriptions in the production environment and in the test environment.

Renewal happens at an accelerated rate, and auto-renewable subscriptions renew a maximum of six times per day. This lets you test how your app handles a subscription renewal, a subscription lapse, and a subscription history that includes gaps.

取自apple documentation .

至于收据 - 您不会获得新的收据,但您应该在同一张收据下获得另一笔交易以进行续订。交易将在交易队列中等待你,你应该使用 SKPaymentTransactionObserver 来监视 SKPaymentQueue 中的新交易。如果您验证收据,您还会看到更新过期日期的新交易。

After a subscription is successfully renewed, Store Kit 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 it’s launched.

也来自相同的文档。

关于ios - 是否测试沙盒自动更新订阅 IOS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40591116/

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