It is being discussed quite a lot on the internet that it is very difficult to get started to develop applications with InApp Purchases. Most of the times developers report that the SKProductsRequest does not yield any result or reports the Product ID of the feature as invalid.
To make this post brief: most of the issues discussed do not exist if you follow the step-by-step guide 100%. However, I got hit by an issue that none of the post addressed:
- my product called EniRemote is already in the store, it has no InApp Purchases
- I want to use InApp Purchases for the update
- on my device that is also used for development, I have EniRemote installed, however, the AppStore version, not the developer version
I followed Apple’s documentation 100%. However, all my IDs were still reported as ‘invalid’. Where did I mess up? First, I waited a couple of hours as a lot of developers claim it takes about 12-24 hours for the AppStore to update. I tried again this morning, the issue prevailed.
Then I remembered that my device had the AppStore version installed. I was able to deploy my app to the device without any issues. It also ran in development mode, however, the application always ran in an environment that was created by the AppStore version. Thus, it always must have queries the live-store, not the sandbox.
How did I fix this? Very easy! I removed the app from my device and deployed it again by debugging it in Xcode. My Product IDs were immediately listed as valid and I can use In-App purchases.
Thus, when using InApp features, make sure that you do only use app environments that have been created by Xcode and not the AppStore. It will not work unless you delete any ‘live-version’ of the app that has been downloaded from the AppStore first.
I really hope this will help some folks to save some time!
