Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't remove iOS InApp Purchase sandbox account

I created 2 accounts to test inapp purchases then deleted one on iTunesConnect. When I test the InApp Purchases it continues to ask me for the password of the deleted account. I've tried to delete the app but this didn't solve the problem. I've also verified that the deleted account was not the current account in "iTunes and App Store settings". It seems this account is cached somewhere ... but where??!!

Any help?

Thanks, Corrado

like image 631
Corrado Avatar asked Dec 07 '15 15:12

Corrado


People also ask

How do I change my sandbox account on my iPhone?

Go to Settings, scroll down and click App Store. Scroll down until you see Sandbox Accounts like in the image below. Click sign in, and login with the email and password you created on app store connect.

How do I change my Apple ID to a sandbox?

In macOS, the sandbox account appears in App Store Preferences after the first time you use the device to make an in-app purchase. Open App Store > Preferences and click the Sign In button to sign in using a Sandbox Apple ID. When you're done testing, sign out of the Sandbox Apple ID from the App Store Preferences.


2 Answers

I understand that it's an old question but maybe someone still have such issue. Try to go Settings -> iTunes & App Store scroll down to bottom and find SANDBOX ACCOUNT and clear data here.

like image 81
Victorianec Avatar answered Oct 05 '22 21:10

Victorianec


I ran across the same problem. It started happening after I began to test my restore code for an in-app purchase. I tried everything, including resetting my iPod, and it didn't matter. The login was happening when adding the transaction observer. I resolved the issue by added the following code before adding the transaction observer.

    for transaction:SKPaymentTransaction in SKPaymentQueue.defaultQueue().transactions {
        SKPaymentQueue.defaultQueue().finishTransaction(transaction)
    }

This was only temporary code, used to clear out the queue, though I don't see a problem with leaving it in. One thing I've been puzzling through is how to handle it when the app crashes while doing an IAP. It seems to leave the IAP in the queue. Instead of finishing a transaction that's the result of a crash, I would rather remove it. I haven't figured out how to do that, yet.

I then added a finishTransaction to the restore, so that I wouldn't have this issue any longer.

like image 26
Scott Kilbourn Avatar answered Oct 05 '22 20:10

Scott Kilbourn