English 中文(简体)
iPhone: Setting up an app for use as an "In App Purchase"
原标题:

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.

最佳回答

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.

问题回答

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.

This code will get you going: works on the simulator too: https://github.com/boxerab/InAppPurchase





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签