I'm trying to test in-app purchase. I have logged out of my account on the phone. When I try to make the purchase, the dialog only asks for a password. It doesn't ask for an email/username. So I cannot log in with the sandbox account. I have also tried to log in in settings with the test user. It still shows the dialog asking for just password. If I enter the sanbox uers password, it says it's incorrect. How can I get the dialog to ask for email and password?
Was this app ever loaded onto this device from the App Store? If so, the 'production app' signature may still be associated with the app even if it is overlayed with a version from Xcode.
Delete the old build of the app. Log out of the app store. Then load the app from Xcode.