7

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

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Corrado
  • 505
  • 1
  • 5
  • 18

3 Answers3

18

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.

Victorianec
  • 587
  • 1
  • 6
  • 15
3

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.

Scott Kilbourn
  • 1,545
  • 6
  • 18
  • 40
2

Go to settings -> iTunes & App Store. Tap on existing logged in Apple Id. Sign out. Then retry from app

Hamza Hasan
  • 1,368
  • 9
  • 17
  • 1
    I did it but when I start testing the buying procedure in my app it still asks me to enter the password for the deleted account! – Corrado Dec 07 '15 at 15:45
  • then reset settings from Settings -> General -> Reset -> Reset All Settings. It will reset you settings only. – Hamza Hasan Dec 07 '15 at 15:48
  • No way! I did the reset but when I press the Buy button in my app it still display the "deleted" account. If I press Cancel, it ask me for the second account ... I enter the pwd and complete the purchase procedure. The problem is that if I exit the app and re-launch, when I press the "Restore" button (to test the restoring procedure), it asks AGAIN for the password of the deleted account ... if I press Cancel in this case the procedure is interrupted! – Corrado Dec 07 '15 at 16:22
  • Well, strange behaviour, but it is for sure that it will not create any conflict or problem after going live – Hamza Hasan Dec 07 '15 at 16:30