Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios In App Purchase Prompted twice for login using Sandbox Account

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?

like image 771
kungfuslippers Avatar asked Aug 20 '15 16:08

kungfuslippers


1 Answers

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.

like image 99
Kiran Jasvanee Avatar answered Jan 25 '23 20:01

Kiran Jasvanee