Sandbox test account asking password repeatedly for iOS In-App Purchase

I developed an application in Swift language. I've added in-app purchases to remove ads. I also created a sandbox account to test. But then I forgot the information of this account. (I'm not sure of the information) The password entry screen is still displayed in a flashing screen display. Even if I reset the device and reload it, it did not benefit. Actually everything is working properly. This is my only problem.What should I do. I'm glad you helped me. Thank you.

Replies

https://i.stack.imgur.com/sbtjN.png

You may have a transaction in the StoreKit queue for which your test user did not call "finishTransaction". Search the forum (circa 2015) for "the endless loop" to read about the horrors of having hundreds of these un-finishedTransaction-s. You can contact Apple engineers (use a DTS ticket) and ask them to remove the transaction from the queue - but that can take months.

Thanks, really bad situation. Where can I send a link to ask Apple engineers? What is DTS? I'll mail them too. I hope they help me.


DTS was meant to be "TSI" and you access them using that drop down menu on the left of this screen and selecting "Code-Level Support".

Thanks. I sended mail.

Apple answered, but I already do what they say. I also do not want to reset my device. How am I supposed to solve this problem?


Answer :

<. I also created a sandbox account to test. But then I forgot the information of this account.>

Your issue may be due to one or more of the following reasons:


-You are running into a transient bug with the App Store. The workaround is restore the device to the latest iOS version. Note that doing so will reset your device to its factory default settings.


Create a new test user account in iTunes Connect. Make sure that you are signed out of the Store on your device before starting to test In-App Purchase on your device. Build and launch your app on your device, enter the new test user account when prompted by StoreKit to authenticate the purchase. Be sure to always use sandbox test user accounts created in iTunes Connect to test your In-App Purchase products. StoreKit connects to the sandbox environment when you launch your application from Xcode, from your test device (iOS), or from the Finder (OS X). It connects to a production environment for applications that were downloaded from the App Store. You must not use your test user account to sign into the production environment. This will result in your test user account becoming invalid. Invalid test accounts cannot be used to test In-App Purchase again.

-You may have an unfinished transaction. As such, you need to call finishTransaction: on the associated transaction to end the loop to resolve your issue. See TN2387 In-App Purchase Best Practices > Add a transaction queue observer at application launch and Finish the transaction for more information on how to prevent this issue.

-You are calling SKReceiptRefreshRequest or restoreCompletedTransactions, which is prompting you to enter your username and password. If calling restoreCompletedTransactions, see When should I use SKPaymentQueue’ s restoreCompletedTransactions method? for more information. If calling SKReceiptRefreshRequest, that would be the expected behavior.

accounts and it works properly. Even though I am deleted from the sandbox , the account continues to ask. >

If your device still prompts you to log in with a deleted test user account, restore your device to the latest iOS version. Note that doing so will reset your device to its factory default settings.

Be sure to not restore your device’s back up. Make sure that you are signed out of the Store on your device before starting to test In-App Purchase on your device. Build and launch your app on your device, enter the new test user account when prompted by StoreKit to authenticate the purchase.


Thanks.

Had this problem too, but was able to solve it myself. Basically, you keep entering something as a password. The dialog will keep appearing, but eventually you will get a different dialog that tells you the username email. Tap Settings on that dialog. Your Sandbox account will be locked, but you can following the prompts to reset the password. Entering that the next time the original dialog appears should stop the endless loop. I wrote up some steps here https://www.seriouslytrivial.com/2020/01/21/ios-development-in-app-purchase-iap-endless-loop-solution/


Hope this works for anyone else that has this issue.

Try


  1. opening Settings
  2. find iTunes & App Stores
  3. scroll down
  4. see "Sandbox Account" section. If logged tap on name to logout, otherwise can sign in.

Please wait a week and report that this still works. The endless loop was like a bad meal, a few hours later.....

I log in test account before. I forgot the password. It will use test account automatically, if you logged in with test account. But you did not notice. You input your own account password.
  1. opening Settings

  2. find iTunes & App Stores

  3. scroll down

  4. see "Sandbox Account" section. Sign out.

It works for me.