Hosted IAP And Receipt Validation

So today we’re adding hosted IAP content to a project for the first time — right out on the cutting edge with those iOS 6 features, that’s us — so that makes it a good time to check out what’s new in the way of IAP support libraries since a long time ago we last had occasion to check out the state of the art. The two we checked out then are:

  • MugunthKumar / MKStoreKit: Seems quiet for the last year, latest README notes “I’m working on In App Purchase hosted content support on iOS 6. It’s implemented, but for some apparent reason, download doesn’t happen.” Next!
  • anystone / AnystoneStoreKit: Also appears to be languishing since initial release, nothing in nine months.

Hmmm. Alright, let’s check on other libraries that we’ve noted the existence of since then:

And let’s go trawling around to see what other libraries we can dredge up that we hadn’t noted the existence of until now. Making the probably reasonably safe assumption that anybody serious these days is doing a CocoaPod for their project and/or will be listed on CocoaControls, that gives us the new entrants

CargoBay has a couple extensions out there as well:

And here’s a selection of tutorials and snippets regarding the hosting and verification process to help smooth out all the rough edges on your choice (if any) of framework:

Introduction to In-App Purchases in iOS 6 Tutorial

Apple In-App Purchase: Creating App Store Hosted Content

Configuring and Creating App Store Hosted Content for iOS 6 In-App Purchases

In-App Purchase content downloads in iOS6

Updating content when using Apple-hosted content for In-App Purchase

App Store Receipt Validation on iOS 7

rmaddy / VerifyStoreReceiptiOS “parses and validates the payload and the PKCS7 container itself.”

DarkHorseComics / DHAppleReceiptParser “A library to parse the apple receipt file in iOS 7 “

A complete solution to LOCALLY validate an in-app receipts and bundle receipts on iOS 7 — check out the epistle from hpique the RMStore author

Well, adding hosted download support is pretty straightforward looking, and iOS 7-savvy receipt validation is most assuredly not straightforward looking in the slightest, so we’re going to go with RMStore here. It looks very nicely done indeed — check out these slides — for making things simpler without getting in your way a lot, which is a pretty fine line to walk. You may find that line for you somewhere more congruent with some of the other options up there of course; and CargoBay is definitely worth a very close look if you’ve already got (or insist on getting) server side verification. We’re perfectly good with the on-device verification here, because there just isn’t enough money at stake with our handful of IAP options to bother getting overly uptight, so RMStore being apparently the current best available drop-in solution for that floats our boat just fine. And besides, there’s already a pull request for download support — yep, looks just about as straightforward as our guess at doing it ourselves would be — so chances are, by the time we get all the content sorted packaged and uploaded, it’ll be there waiting!

UPDATES:

Monza – Script For Easily Validation iOS In-App Purchases And Subscriptions

Alex | November 21, 2013

Leave a Reply