Tap Gun

The development blawgh of Önders et Gonas

Monthly Archives: March 2011

How Not to Disable In-App Purchases for Your Live App

Finally! The holy grail of iOS development blawghs. A legitimate reason to rail against Apple and their draconian practices.

During last week we had a problem with In-App Purchases for Warcode. Warcode is a free download on the App Store, and if you like it you can buy the full version from inside the game with the IAP API. But suddenly it had stopped working. By checking the console output from the device I could determine that it was the dreaded “Invalid product ID” error that everyone who tries to implement IAP has seen once or twice during development while trying to get everything to work (a process detailed in numerous other blog posts around the interwebs.) But I’ve never seen it in a live app on the App Store and that was a bit unsettling.

From a developer perspective, one of the main awesome things about the iTunes App Store is that it’s super easy for people who want to give you money to do that, and you don’t have to deal with handling transactions, you just get paid (potentially in dollar dollar bills, y’all*). The problem is when it’s not working it’s very hard for the people who want to give you money to do that, and that’s obviously a lose-lose-lose situation (both customer, us and Apple loses). So I have a hard time understanding why the IAP system is so easy to break.

Anyway on to the story. A bunch of things had happened that could somehow be related, like us just having renewed our Developer program membership and our Paid Apps contract having expired and we just resubmitted that and all sorts of stuff, so I made sure everything looked in order and everything had little green dots next to them in iTunes Connect. I also contacted Apple through some form, but I haven’t heard from them yet. So I waited and nothing seemed to happen, our sales figures were still a boring flat line.

Then I remembered something about the IAP system being very particular about which status your app is in in iTunes Connect. During development I had to submit unfinished apps to be able to test the IAP and then reject them so they didn’t reach the review team, a total mess obviously and also detailed in other blog posts about IAP. Obviously Warcode was in the Ready for Sale status, as it was up on the App Store… but I had created a new version on iTunes Connect.

I had written the update notes and updated the metadata, so everything was ready for our updated version (which we’re still working on), but it was in status “Ready for Upload”. I thought maybe that’s the culprit, let’s remove it temporarily to check. But no, sorry, you can’t remove new versions that you have created in iTunes Connect. But I was determined to check if this was the problem, so what I did was I uploaded a version with some bug fixes as the version 1.1 that I had created. This update does not contain all the updates we’re currently working on, it was taken from a bunch of revisions back in our version control system. But now the new version was in status “Waiting for Review.”

And voila! That was indeed the problem. Amazingly In-App Purchases now works in the version of Warcode that is on the App Store again (i.e. version 1.0, the version I uploaded as 1.1 is not reviewed yet.) So the lesson learned is: if your app uses In-App Purchases, don’t create a new version in iTunes Connect until the moment you’re ready to upload the new version as you will disable all IAP in the current version of your app.

It’s possible that this is documented in one of the guides you can download from Apple, but I hope this post can help someone in case there are other people like me (a bit too cool for school) out there.

* We’re in Europe, so actually it’s euro euro bills y’all.