I’ve spent the past couple days trying to figure out why the IAP products I’d set up for my unplublished app suddenly stopped working, even though I hadn’t touched the previously working code. I keep getting “invalid” products returned when I query the store with store.loadProducts, even thought the products were working fine a few days ago.
After a live chat session with a support person at Google I learned that some time over the last week they changed the requirements for testing IAP. His words:
We recently made a change to how testing works for in-app purchases, OBB files, and licensing that requires an app to be published to test.
So, how are we supposed to test IAP on apps that aren’t published yet?
We’re currently recommending that you upload to alpha or beta to test these features.
Currently I don’t believe this change is documented, although he said
We’re working to update our documentation to reflect these changes.
Unfortunately, since I already set up a production version to test with, if I publish it will send my still unfinished app straight to the Google Play store! There doesn’t seem to be a way to only publish a beta without triggering the publishing of the production version. He suggested that
Since you already have an app in production, I would say reupload you app as a new app with a different package name just for testing purposes.
EDIT: This seems like wrong info. As long as the production version is unpublished, uploading a beta version removes the production version. Then publishing the beta should make it available for IAP testing.
That is going to be messier than it sounds since, beyond the new license key, keystore, app number, and product SKU IDs I need to change throughout my code just to create a new test app, I also have dozens of leaderboards and achievements set up in the current app that I guess would need to be duplicated.
Not sure what I’m going to do at this point, but wanted to share what I was told in case other people are in the same boat and having troubles testing their Google Play IAP in an unpublished app.
-Stephen