iPhone:设置应用程序以用作“应用程序内购买”
关于应用内购买,我可以找到很多有关实际购买和与商店交互的所有技术细节(如何检索产品信息、验证收据等)的信息,但我似乎找不到有关指南或信息的信息有关准备实际“应用程序”或“组件”的特殊说明,无论要考虑什么,都将充当应用程序内购买。
例如,一旦一个组件被下载到应用程序中,它存在于应用程序的整体架构中的什么位置?他们如何结合,形成合力?他们如何互相了解。如果我有一款游戏,并且使用应用内购买,我允许用户既下载新关卡,又下载可能影响任何内置或下载关卡的新游戏模式,我如何准备所有这些资产,以便他们整合?
我本身并不是在寻找教程,但很想知道是否有人有过应用程序内购买的经验,或者知道除了苹果的应用程序内购买编程指南之外的有用参考资料,该指南仅涉及实际下载的细节交易。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此代码将帮助您继续:也适用于模拟器:https://github.com/boxerab/InAppPurchase
This code will get you going: works on the simulator too: https://github.com/boxerab/InAppPurchase
您下载的东西并不是真正的“应用程序”,它们只是数据文件,就像您的应用程序可以下载的任何其他内容一样。
有时,它们并不是真的,它们只是有效的“开关”,即所有功能和数据都已经存在于您的代码中,但它只是受到一行代码的保护,例如
您不允许下载新的可执行代码;我承认我不确定苹果公司有多仔细地阻止你下载控制程序行为的脚本,因为他们很难判断你的原始应用程序是否固有的。
在我自己的程序中,我将控制逻辑和表放入主应用程序中,并将大资源文件分离到单独的 ZIP 文件中。当用户购买附加包时,他们会下载图像的 ZIP 文件,这会缩小原始应用程序的大小,并且程序只是使用文档目录中的这些图像,而不是像构建应用程序包时那样使用应用程序包 我正在
使用 Urban Airship 应用内购买支持,它可以让您免于运行自己的服务器或了解 StoreKit 的大部分详细信息,但代价是您的一部分收入。
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
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.
您可以从一开始就让关卡存在于应用程序中,并在用户支付应用内关卡后才可以使用它们。这是迄今为止最简单的解决方案。
如果您想拥有可下载的关卡,您将需要设置一个自己的服务器,该服务器将通过苹果服务器传送和检查正确的购买交易。您还需要创建所有下载和架构以将这些级别加载并使用到您的应用程序中。
但是,您可以在这里查看 http://urbanairship.com/in-app-purchase/< /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.