I\'m trying to test in app purchases in our app but I\'m not having any luck. Part of the problem may be due to the expected sequence not being documented anywhere. Here a
None of these answers is very specific or wholly correct, and the in-app behavior has changed slightly over the past year wrt test accounts. The true/current solution to this if you hit it: go through the review/sign-in pages in iTunes for the test account and just "cancel" from the "enter billing information" screen with no harm, no foul. If for whatever reason you never get prompted to review/sign-in, then don't bother to do so.
I was able to get around this issue by signing my test user into a different app that I was developing, then going back to the app where I was having problems (no amount of deleting or restarting helped). As others have said, you don't want to be signed in as the test user in the Settings menu when you try to perform your IAP.
I've experienced the same problems until I quit iTunes and installed the right provisioning profile to my device. Running iTunes with Xcode restored my account from time to time so even when I log out on the device I was suggested to use my (not test) account in the app. Installing the correct profile fixed the second problem.
Hope it can help somebody too.
This sequence worked for me. I tried all of the above sequences and they failed for me.
Thanks to OmegaDelta's blog for this one: http://omegadelta.net/2011/05/11/testing-in-app-purchases-in-ios-4-3-sandbox/
Here is the trick (at least if worked for me..).
First log out of your real iTunes account in Settings > Store > Apple ID. You must be logged out of an account to be able to use your test account.
However, don't log in to your test account on that screen.
Go to the app, initiate your in-app purchase, and enter the test account email and password there. Assuming the test account is set up correctly (!), that should work.
Then, when finished testing, go back to Settings > Store > Apple ID and log out of the test account.
It happens when you install your development application over downloaded from App Store. To fix this issue, you need to remove application from the device and install fresh copy using XCode. iOS caches distribution profile somehow and requires production user if the first installation was done through App Store. With no regard what installation method was used recently.