我目前正在尝试将 IAP 添加到现有应用程序。为此,我添加了一些产品并创建了一些测试用户。这些产品是定期订阅。我正在测试的设备是装有 iOS 5.1 的 iPhone 4S。
我可以成功地在商店中查询我的产品,并通过我的新测试用户成功购买它们。我遇到的问题是,如果我尝试从商店设置应用程序管理我的订阅,它会通过告诉我“此帐户尚未用于在 AppStore 中购买任何东西,请检查您的帐户并继续”如果我查看该帐户,它将不允许我在不提供信用卡信息的情况下继续操作。
最终结果是我永远无法取消我的测试订阅。我已经删除了测试用户并创建了新用户,删除了应用程序并重新安装了它,杀死了 StoreApp 和设置应用程序,重新启动了设备,在购买前通过电子邮件验证了帐户,在购买前没有通过电子邮件验证帐户......所有排列似乎失败了。
有时我会购买相同的订阅两次,这会提示 StoreKit 要求我管理我的订阅设置。有时这会导致之前的“帐户审查”过程,有时会导致“无法连接到 iTunes Store”的警告。
我已经想不出如何继续了。
编辑 - 这是我创建的任何 iTunesConnect 测试用户的事件流
初始订阅
使用现有ID
测试帐号登录
管理订阅
AppStore登录
无法连接到 AppStore
检查您的帐户
然后,审查过程迫使我输入信用卡信息,即使我的地址是“1 Infinite Loop Cupertino, CA”(即它知道这是一个测试帐户)。
最佳答案
您无法真正在沙盒中管理订阅,但正如 Jean-Paul de Ville de Goyet 在 Apple Developer Forums 上发现的那样:
1 month subscriptions auto-renew every 5 minutes. So far so good. They auto-renew 5 times and then they stop, so after 25 minutes you'll get the 21006 error. However even when repurchasing the same subscription it will NOT auto-renew again on the same test account since it has already auto-renewed 5 times. So if you want to test renewal and you have been messing with these subscriptions for a while you need to create a new itunes connect test user. This is very annoying honestly and it would be a lot easier if we could just reset the entire purchase history of a test user account.
我以同样的方式测试了我的订阅。
关于iOS 沙盒测试用户帐户订阅管理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10289011/