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

大憨熊 提交于 2019-12-30 02:17:11

问题


I made a sandbox iTunes user, bought an item. 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.

I'm using MKStoreKit.

Any ideas?


回答1:


Well, I figured it out. MKStoreKit saves purchased items to the keychain, which persists even if you change iTunes accounts or delete the app. Calling a quick [[MKStoreManager sharedManager] removeAllKeychainData]; reset things.




回答2:


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. This makes it very easy to create loads of test accounts without having to have a separate email account for each one.



来源:https://stackoverflow.com/questions/7604578/how-can-i-reset-sandboxed-in-app-purchases-on-ios-for-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!