8
votes

I'm building an application that uses IAP.

I've noticed than when I buy a product in the Sandbox environment (using the following basic code)

SKPayment * payment = [SKPayment paymentWithProduct:product];
[[SKPaymentQueue defaultQueue] addPayment:payment];

If I'm entering the sandbox account credentials for the first time, I see the iTunes sign in dialog with the Use Existing Apple ID, Create New Apple ID, Cancel dialog box.

I then enter my sandbox account credentials...and then I'm prompted with exactly the same dialog box to enter the credentials again...after which I'm able to make a successful purchase.

On subsequent attempts to make a purchase I'm only every prompted for my credentials once.

It only seems to happen if there's no Apple ID setup in Settings->iTunes & App Store -> Apple ID on my device.

Any idea why this is the case?

1

1 Answers

8
votes

I had a same issue.
I went through https://forums.developer.apple.com/thread/14088 mentioned answers, If You are using sandbox testing app store account credentials for In-app purchase, then it will prompt to enter username and password twice for sure but it will work well on Live.