Testing In-App Purchases

Hello all,

I have wasted serveral days trying to get in-app purchases working so any help is truly appreciated.


I am making a game in Unity3d. I have integrated Unity's "codeless" IAP into my project and have entered all of the IAP catalog items in there. The IAPs are working in the Unity test store and Google Play. I suspect everything is set up correctly in my project.


On the Xcode side I have built my project with Game Center and In-App Purchases enabled in the build. All of the checkboxes are checked and the button is blue and says on so I assume everything is set up correctly here.


My game is still in testing and I have several distributions out in TestFlight. I have my IAPs set up in the Features tab and they are all in "Ready to Submit" status. I submitted a game for beta testing review and it just went live but none of my IAPs were approved. I still have this message:


Your first in-app purchase must be submitted with a new app version. Select it from the app’s In-App Purchases section and click Submit.

Once your binary has been uploaded and your first in-app purchase has been submitted for review, additional in-app purchases can be submitted using the table below.


I had read in another forum post where the user expressed confusion about this message. The response was that the app had to be submitted for approval. I'm not ready to begin this process (unless I absolutely have to because Apple says so).


My question is, how do I test my IAPs? Should they work while they are pending submission?


I am reading conflicting information on this topic. Apple's developer FAQ says you need to use a Sandbox account. This FAQ also has dead links so I'm not sure how dependible this information is. I had read elsewhere that you no longer needed to use Sandbox accounts to test IAPs and that all beta testers automatically had a sandbox account created for them in TestFlight. Anyone know which of these is true?


I do have a sandbox account set up but if I try to switch my iTunes login to that account, I get this error: This Apple ID cannot be used with the iTunes Store at this time. Please try again later.


Currently, in my game, I am getting a PurchasingUnavailable error with a more detailed message saying initialization failed.


Any ideas anyone?

You test the IAPs in the sandbox environment. (When a user first logs into TestFlight, TestFlight creates a new sandbox test user that copies their username and password. An app run out of testflight always accesses the sandbox environment.) You should log out of your App Store account before running an app in TestFlight or from Xcode. Then you should log into your sandbox test user account only when asked by the app.

Unfortunately I am getting the same error message when I try to log into the sandbox account via TestFlight.

The "same error message" you are getting is, I assume:

This Apple ID cannot be used with the iTunes Store at this time. Please try again later.


As I wrote above:

When a user first logs into TestFlight, TestFlight creates a new sandbox test user that copies their username and password.


In TestFlight there is a little icon in the top right. Tap that and it will show your Apple Id. Use that Apple Id to log into the App Store from within the app running under TestFlight. Do not log into the App Store until asked by StoreKit within the app.

Testing In-App Purchases
 
 
Q