How to Fix Invalid Product ID in In-App Purchases
Yesterday after application that I’m programming for a client being rejected once again from Apple because of “inappropriate use of In-App Purchases” I had to delete old one and create a new one in iTunes Connect. Of course after that the error that I was getting while trying to test application is Invalid product id and Apple didn’t wanted to let us know anything like reason why it’s invalid so any kind of debugging is sufficient.
To solve this problem there is a simple solution.
Delete application from testing device and then let the XCode install it again.
Because of something known only to Apple, XCode is treating installed application as application installed from App Store and it won’t allow it to register with StoreKit framework properly and that’s the reason why Invalid product id is occurring.
I have just lost a whole day waiting In-App Purchase to become valid instead of just deleting app from iPhone and installing it again. I have tested to create new In-App Purchase in iTunes connect and it was directly recognized by StoreKit and it worked directly out of the box.