我的一所大学实现了每月自动续订的 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/