How to cancel my own test in-app-purchase transaction? (so I can test again)
I'm implementing an in app purchase for an iPhone app. All is good - store kit is very easy to use and everything is working after few hours of programming.
Problem is : my product is non consumable, thus once I bought it, the app store always says that I already have it and does not let me test the payment again, it just calls transaction restore method.
Again : it's a NON consumable product.
Anybody knows how can I delete my purchase of that product, so I can test the payment again?
(wit开发者_如何学编程hout registering new test account, or other funny workarounds)
I don't think you can do exactly what you want to do. You might find SimStoreKit useful for testing, but to do it with the real test store, I think you would have to create a new user.
- Delete the app from your device
- Run "Clean" from the Product menu in XCode
- On your device, go to "Settings", "Store", "Apple ID", and Sign Out
- Start your app again, since you're not signed in to any account, the previous in-app purchase will not be recognized and you'll be able to buy it/download it again with the same test user account
精彩评论