One of my iOS apps has been in the App Store for years, offering different non-consumable in-app purchase items.
Currently I am working on adding some new consumable items as well. Since the simulator does not support test purchasing I am running the test on my real device:
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]
I expected that iOS would present an App Store login where I could use the credentials of the new test account. Instead paymentQueue:updatedTransactions:
is called with different transactions in SKPaymentTransactionStateRestored
state. I assume that these are the real transactions I made with my real App Store account some time ago.
How is this possible when being logged out from iTunes/App Store?
The result is the same, even when I login to the test account within the system settings, reboot the device run the restore process than.
Why are the transactions of my real account are restores while being logged in with another account (the test account)?
What can I do do force iOS to log out from my real account and use the test account instead?
Check Settings->iTunes & App Stores -> Scroll Down here is SANDBOX ACCOUNT log out sandbox account too and everything will work