views:

756

answers:

2

Regarding In App Purchases, I can find a lot of information on all the technicalities of actually making purchases and interacting with the store (how to retrieve product information, verify receipts, etc), but I can't seem to find information on guidelines or special instructions for preparing the actual "apps" or "components," whatever they're to be considered, which will act as the In App Purchases.

For instance, once a component is downloaded into an app, where does it exist in the overall architecture of the app? How do they combine to join forces? How do they know about one another. If I have a game, and using In App Purchases I allow users to both download new levels, but also download new game play modes that can affect any of the built-in or downloaded levels, how do I prepare all of these assets so that they integrate?

I'm not looking for a tutorial, per se, but would love to know if anyone has had experience with In App Purchases or knows of a useful reference besides Apple's In App Purchase programming guide which only speaks to the specifics of making the actual download transaction.

A: 

You can let the levels be in the app from the beginning and just let them become available when the user pays an in-app level. This is by far the most simple solution.

If you want to have downloadable levels you will need to set up an own server that will deliver and check correct purchase transactions with apples servers. You will also need to create all the download and architecture to load and use these levels into your app.

But, you can have a look here http://urbanairship.com/in-app-purchase/ for help in creating downloadable items.

epatel
+2  A: 

The things you download aren't really "apps", they're just data files like anything else your app can download.

Sometimes, they're not really that, they're just effective "switches", i.e. all of the functionality and data is there in your code already, but it's just protected by a line of code like

if (user has purchased extra levels)
    add extra items to menu/list

You aren't allowed to download new executable code; I admit I'm not sure how carefully Apple works to prevent you from downloading scripts that control your program's behavior, since it would be very difficult for them to tell what is intrinsic to your original app or not.

In my own programs, I've put the control logic and tables into the main application, and separated out big resource files into a separate ZIP file. When the user buys the add-on pack, they do download that ZIP file of images which keeps the original application size down, and the program just uses those images out of the documents directory instead of the application bundle like it would if they were built in.

I am using the Urban Airship in-app purchase support, which insulates you from running your own server or learning most details of the StoreKit, at the cost of a slice of your revenue.

David Maymudes
I'd like to develop a model similar to Ramp Champ. Since its original release, a handful of additional levels have been created. The animations in each are unique, leading me to believe each had new executable code. But based on what you've described, they probably simply include new animation instructions along with new artwork for each level. If I did want to release brand new functionality as an In App Purchase, would you suggest including (and locking) the new executable code as part of an update to the app and then unlocking the code once the appropriate In App Purchase is made?
RyJ
Right, I think you either have to have the code you need in v1.0 of your app, or the other alternative is that when you submit v1.0.1 of your app as an update you can submit additional in-app-purchase items to Apple and tell them "review these along with my update, please".
David Maymudes
Great, this is all good info. Thanks for demystifying In App Purchases for me David.
RyJ