iOS 应用内购买和订阅 : Testing

标签 ios in-app-purchase subscription

我的一所大学实现了每月自动续订的 iOS 应用内购买。我正在接管代码库并想测试它是否正常工作。我知道购买有问题,但我担心的是自动续订。

我已经设置了一个测试用户并阅读了在沙盒模式下说的 Apple 文档,沙盒中一个月是 5 分钟。

但是我在 5 分钟后没有收到 Apple 的任何回复?我应该吗?

在我的 AppDelegate 中

 inAppPurchase = [TFInAppPurchase new];
[[SKPaymentQueue defaultQueue] addTransactionObserver:inAppPurchase];
[inAppPurchase updateAvailableProductsCache];

我预计 5 分钟后,它会触发通知或其他什么?

最佳答案

iTunes development guide ,有沙盒模式下自动续订订阅持续多长时间的列表:

Sandbox Testing Your In-App Purchases

You are required to test your in-app purchases in a sandbox environment before you submit them for review by Apple. You must first sign out of your iTunes Store account from your test device Settings before attempting to use the sandbox environment. If you mistakenly use your test-user-account credentials to log in to a production environment on your test device (instead of in to your test environment), your account credentials become invalid and cannot be used as a test account again. For more details on how to avoid mistakes during test account use, see “Using Test User Accounts.”

When testing auto-renewable in-app purchase subscriptions in the sandbox environment, the duration times will be compressed to allow for more streamlined testing. Additionally, a sandbox subscription will only auto-renew a maximum of 6 times. After the subscription has auto-renewed 6 times, it will no longer renew in the sandbox. The compressed duration times are as follows:

   Actual duration      Sandbox duration
   1 week               3 minutes 
   1 month              5 minutes
   2 months             10 minutes 
   3 months             15 minutes 
   6 months             30 minutes 
   1 year               1 hour

关于iOS 应用内购买和订阅 : Testing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14710240/

相关文章:

javascript - JS/jQuery - 强制点击文本区域元素

ios - iOS:删除目录中的文件

ios - 应用程序运行时不显示自定义原型(prototype)单元格

android - 应用内购买 : how to give an item to an user for free

azure - 如何在零停机的情况下将 Azure Pay 即付即用订阅迁移到 Azure 计划?

ios - 使用 Flutter for iOS 检索订阅 IAP 产品列表

ios - 沙盒自动续订订阅能否在应用程序重新安装后继续存在

ios - 仅使用 inNumberFrames 信息在 AudioBufferList 中分配缓冲区 iOS

android - 为什么 SDK 管理器中没有显示 Google Play 结算库?

ios - 有没有办法从 StoreKit API 中的 SKPayment 获取 SKProduct?