博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

In-App Purchase--Overview of In-App Purchase(2)

Posted on 2012-03-15 22:36  星尘的天空  阅读(480)  评论(0编辑  收藏  举报

PS:之所以写这些文章,一个方面是提高英文水平,一个是学习in-App purchase ,真的没有想到会有5个人看这个文章,所以我想我还是坚持下来翻译这些文章。

 

Overview of In-App Purchase

Store Kit communicates with the App Store on behalf of(代表) your application. Your application uses Store Kit to receive localized(本地化的) information from the App Store about products you want to offer in your application. Your application displays this information to users and allows them to purchase items. When a user wants to purchase(采购) an item, your app calls Store Kit to collect payment from the user. Figure 1-1 shows the basic store model.

翻译:应用程序内购买概述

Store Kit  代表你的应用程序与AppStore进行交互。 你的应用程序通过Store Kit 接收来自AppStore的本地化信息,这些信息是关于你在应用程序中提供的产品信息。应用程序将这些产品信息展现给用户并让用户购买这些产品。 如果一个用户想购买其中一你的产品,那么,你的应用程序就调用Store Kit 让他收集购用户的信息。下图 1-1 展示基本的商店模式。

Figure 1-1  In-App Store model

 

The Store Kit API is only a small part of the process of adding a store to your application. You need to decide how to track(跟踪) the products you plan to deliver, how your application presents a store front(展现到 ×× 面前) to the user, and how your application delivers the products users purchase from your store. The rest of this chapter explains the process of creating products and adding a store to your application.

 

(翻译)Store Kit API 是你将Store添加到你的App整个过程的一个很小的部分。 你必须决定如何跟踪你计划交付给用户的产品、决定你的应用程序如何将Store展现给你的用户、决定你的应用程序如何投递(递送)用户从你的商店中购买的产品。本章剩余的部分将向你解释从创建产品到添加Store到你的应用程序中的整个过程。

 

 

 

Products

A product is any feature that you want to sell in your application’s store. Products are associated with the App Store through iTunes Connect in the same way that you create new applications. There are four supported kinds of products that you may sell using In-App Purchase:

  • Content includes digital books, magazines, photos, artwork, game levels, game characters, and other digital content that can be delivered(交付) within your application.
  • Functionality products unlock or expand features you’ve already delivered in your application. For example, you could ship a game with multiple(多种) smaller games that could be purchased by the user.
  • Services allow your application to charge(收费) users for one-time services, such as voice transcription. Each time the service is used is a separate purchase.
  • Subscriptions(订阅) provide access to content or services on an extended basis. For example, your application might offer monthly access to financial(财务) information or to an online game portal(门户网站).

翻译:产品

一个产品就是你想在您的应用程序商店中出售的任何要素(东西)。 通过iTunes将商品和AppStore进行关联的过程和你创建一个新的应用的过程是相同的。这里有四种受支持产品你可以使用 应用程序内购买机制 进行销售:

  1:电子书籍、杂志、图片、艺术品、游戏级别和其他的数字内容都可以通过你的应用程序进行交付。

  2:解锁某些功能或者扩大(扩展)你已经在应用中交付的元素,比如,你可以ship一个包含很多小游戏的大游戏,并且用户可以购买这些小游戏。

  3:你可以用户出售一次性的某种服务,比如:语音转录,每次使用服务都是一个单独的购买过程。

  4:订阅提供了一种访问额外内容或者服务的权利。 比如,你的应用程序可以提供以月分为单位的财务报表,或者一个在线的游戏门户网站。

 

In-App Purchase provides a general mechanism(机制) for creating products, leaving the specifics(细节) of how your products are implemented up to you. However, there are few important guidelines(方针) to keep in mind as you design your application:

  • You must deliver a digital good or service within your application. Do not use In-App Purchase to sell real-world goods and services.
  • You may not offer items that represent intermediary currency(货币) because it is important that users know the specific(具体的) good or service they are buying.
  • Items you offer for purchase may not contain, or relate to, pornography(色情), hate speech(仇恨言论), defamation(诽谤), or gambling(赌博) (simulated gambling is acceptable).

For detailed information about what can be offered using In-App Purchase, consult(征询、参考) your licensing agreement

 


翻译

In-App Purchase(应用内) 提供了一个一般的机制用于创建产品,让你远离那些产品何实现过程的细节,尽管如此,这里还是有一些在你设计应用程序的时候应该牢记在心的准则。

  1:你应该在你应用中交付数字产品或者服务。 不要试图通过 应用内购买机制 出售真实的物品以及真实的服务。

  2:你不能提供任何代表中间获取的的元素,因为让用户清楚的知道他们正在购买的具体商品或者服务是非常重要的。

  3:你要出售元素不能包含或者涉及如下这些方面,比如:色情、仇恨言论、诽谤、赌博。(模拟的赌博是允许的).

更过关于 使用in-App purchase可以出售什么商品的详细信息 ,请参考您的许可协议。

Registering Products with the App Store

Every product you wish to offer in your store must first be registered with the App Store through iTunes Connect. When you register a product, you provide a name, description, and pricing for your product, as well as other metadata(元数据) used by the App Store and your application.

You identify a particular product using a unique string called a product identifier. When your application uses Store Kit to communicate with the App Store, it uses product identifiers to retrieve the configuration data you provided for the product. Later, when a customer wants to purchase a product, your application identifies the product to be purchased using its product identifier.

翻译:在App Store中注册产品

任何你希望在你的商店中出售的产品都必须首先通过iTunes Connect注册到App Store。 当你注册一个产品,你需要为你的产品提供一个名称、描述和价格,这和其他在App Store和你的应用中的元数据是相同的。(这里的相同是指:都有名称、描述或许还有价格);

你通过一个唯一的字符串来鉴别一个特殊的产品,我们称这个唯一的字符串为 product identifier (产品表示符)。当你的应用程序通过Store Kit和App Store进行交流的时候,App Store 使用 product identifier 来获取(读取)你提供给产品的配置数据。 随后,如果一个用户想购买一个产品,你的应用通过这个 product identifier 来鉴别用户购买的产品。

 

The App Store supports many types of products:

  • Consumable products must be purchased each time the user needs that item. For example, one-time services are commonly implemented(实施) as consumable products.
  • Non-consumable products are purchased only once by a particular user. Once a non-consumable product is purchased, it is provided to all devices associated with that user’s iTunes account. Store Kit provides built-in support to restore non-consumable products on multiple devices.
  • Auto-renewable subscriptions(订阅) are delivered to all of a user’s devices in the same way as non-consumable products. However, auto-renewable subscriptions differ in other ways(在其他的方面不同). When you create an auto-renewable subscription in iTunes Connect, you choose the duration of the subscription. The App Store automatically renews the subscription each time its term expires(过期). If the user chooses to not allow the subscription to be renewed, the user’s access to the subscription is revoked(取消) after the subscription expires. Your application is responsible for validating(验证) whether a subscription is currently active and can also receive an updated receipt(收据、回执) for the most recent transaction.
  • Free subscriptions are a way for you to put free subscription content in Newsstand(报摊). Once a user signs up for a free subscription, the content is available on all devices associated with the user’s Apple ID. Free subscriptions do not expire(过期) and can only be offered in Newsstand-enabled apps.
  • Non-renewing subscriptions are a mechanism for creating products with a limited duration. Non-renewing subscriptions differ from auto-renewable subscriptions in a few key ways:
    • The term of the subscription is not declared when you create the product in iTunes Connect; your application is responsible for providing this information to the user. In most cases, you would include the term of the subscription in the description of your product.
    • Non-renewing subscriptions may be purchased multiple times (like a consumable product) and are not automatically renewed by the App Store. You are responsible for implementing the renewal process inside your application. Specifically, your application must recognize when the subscription has expired and prompt(提醒,提示) the user to purchase the product again.
    • You are required to deliver non-renewing subscriptions to all devices owned by the user. Non-renewing subscriptions are not automatically synchronized(同步) to all devices by Store Kit; you must implement this infrastructure(基础设施) yourself. For example, most subscriptions are provided by an external server; your server would need to implement a mechanism to identify users and associate subscription purchases with the user who purchased them.

Detailed information about registering products with the App Store can be found in iTunes Connect Developer Guide.

 

 

Feature Delivery

The delivery(交货、输送) mechanism(机制) your application uses to provide products to users has significant(重要的,重要的) implications(影响) on its design and implementation. There are two basic models you should expect to use to deliver products to users: the built-in model and the server model. In both models, you track(追踪) the list of products offered in the store and deliver products successfully purchased by users.

Built-in Product Model

In the built-in product model, everything required to deliver products is built in(修建于) to your application. This model is most often used to unlock functionality in your application. You could also use this model to deliver content provided in your application’s bundle. A key advantage of this model is that your application can promptly(及时) deliver products to the customer. Most built-in products should be non-consumable.

Important In-App Purchase does not provide the capability for your application to be patched(修补) after a successful purchase. If your product requires changes to your application’s bundle, you must deliver an updated version of your application to the App Store.

 

To identify(鉴定、辨别、辨认)products, your a

 

pplication stores the product identifiers in your application’s bundle. Apple recommends using a property list (plist) to track product identifiers for your built-in features. Content-driven applications can use this to add new content without modifying the source for your application.

After a product is successfully purchased, your application must unlock the feature and deliver it to the user. The simplest way to unlock features is by changing your application preferences(喜好). See “Implementing Application Preferences”. Application preferences are backed up when users backs up their iOS-based devices. Your application may want to recommend to users that they back up(备份) their devices after making a purchase to ensure that purchases are not lost.

Figure 1-2 shows the series of actions your application takes to deliver a built-in product.

 

Server Product Model

In the server product model, you provide a separate server that delivers products to your application. Server delivery is appropriate for subscriptions, services and content, because these products can be delivered as data without altering your application bundle. For example, a game might deliver new play environments (puzzles or levels) to the application. Store Kit does not define the design of your server or its interactions with your application. You are responsible for designing all interactions between your application and your server. Further, Store Kit does not provide a mechanism to identify a particular user. Your design may require you to provide a mechanism to identify a user. If your application requires these (for example, to track which subscriptions are associated with a particular user), you need to design and implement this yourself.

 

 

Apple recommends you retrieve product identifiers from your server, rather than including them in a property list. This gives you the flexibility(灵活性) to add new products without updating your application.

In the server model, your application retrieves the signed receipt(收据) associated with a transaction and sends it to your server. Your server can then validate(验证) the receipt and decode(解码) it to determine which content to deliver to your application. This process is covered in detail in “Verifying Store Receipts.”

The server model has additional security and reliability(可靠性) concerns. You should test the entire environment for security threats. Secure Coding Guide provides additional recommendations.

Although non-consumable products may be recovered using the built-in capabilities of Store Kit, non-renewing subscriptions must be restored by your server. You are responsible for(负责) recording information about non-renewing subscriptions and restoring them to users. Optionally(可选), consumable products could also be tracked(跟踪) by your server. For example, if your consumable product is a service provided by your server, you may want the user to retrieve(取回) the results of that request on multiple devices.

 

 

THE END !