简体   繁体   English

如何在iOS上重置沙盒应用内购买以进行测试?

[英]How can I reset sandboxed in-app purchases on iOS for testing?

I made a sandbox iTunes user, bought an item. 我做了一个沙盒iTunes用户,买了一个项目。 That worked but there were some issues in my code for displaying the item. 这工作但我的代码中有一些问题用于显示项目。 So, I want to re-buy it to test again. 所以,我想重新购买它再次测试。 Problem is, I can't clear my purchases. 问题是,我无法清除我的购买。 I signed out my sandbox user, deleted the app and re-installed it, changed itunes users a few times... the item still shows up as purchased. 我退出了我的沙盒用户,删除了应用程序并重新安装了它,更改了iTunes用户几次......该项目仍显示为已购买。

I'm using MKStoreKit. 我正在使用MKStoreKit。

Any ideas? 有任何想法吗?

Well, I figured it out. 好吧,我明白了。 MKStoreKit saves purchased items to the keychain, which persists even if you change iTunes accounts or delete the app. MKStoreKit将购买的商品保存到钥匙串中,即使您更改iTunes帐户或删除应用程序,钥匙串仍然存在。 Calling a quick [[MKStoreManager sharedManager] removeAllKeychainData]; 调用快速[[MKStoreManager sharedManager] removeAllKeychainData]; reset things. 重置的东西。

If you have your own domain, you often get email handling for free; 如果您拥有自己的域名,通常可以免费获得电子邮件处理; for example, I have a go daddy account, and I can set a mail forwarding rule for unrecognised email accounts. 例如,我有一个go daddy帐户,我可以为无法识别的电子邮件帐户设置邮件转发规则。 This makes it very easy to create loads of test accounts without having to have a separate email account for each one. 这使得创建大量测试帐户变得非常容易,而无需为每个帐户创建单独的电子邮件帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM