When testing your In App Purchases on iOS there seems to be a very specific order in which to user your test user accounts or you will end up with iOS thinking your “test” user is a real user and hence asking you to verify the account in an infinite loop.
To use a test user to buy/test your IAP code do the following:-
1. Create a new test user in iTunes Connect. For the email address use a fake, made up, email address (you don’t need a real email address, actually better you don’t just in case your email address was previously used for an Apple ID you forgot about).
2. On your iOS device, log out of the iTunes account: Go into settings, then “iTunes & App Store”, touch the “Apple ID:xxxx” at the top if you are logged in, sign out.
3. Run/debug you app. Buy your item and use your new test users email and password to log in.
4. Done! All should have worked as expected, you shouldn’t have seen any verify prompt, your purchase code should have executed and you should have been able to debug any problems.
Item is still purchased after logging out of iTunes
Note that logging out of your iTunes test user account (in Settings), or even logging in as with a different Apple ID doesn’t affect the status of your purchases, if you bought something your app still thinks it is purchased. To wipe this info you need to uninstall your app.
So delete your app and then run again, go test your “restore purchases” button (you should have one). You should be able to log back in with your test Apple ID that you made purchases with and see the items obtained again. Again, you should also have been logged out of any other Apple ID accounts at the time you do this.