在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ iOS/ 創(chuàng)建和配置產(chǎn)品
恢復購買記錄
內(nèi)置購買
介紹
準備應用程序?qū)彶?/span>
創(chuàng)建和配置產(chǎn)品
獲取產(chǎn)品信息
支付請求
使用訂閱
如何測試應用程序內(nèi)置購買
產(chǎn)品交付

創(chuàng)建和配置產(chǎn)品

A product is something you want to sell in your app’s store. You create and configure products in iTunes Connect, and your app interacts with products using the SKProduct and SKProductsRequest classes.

產(chǎn)品是你想要在應用商店里出售的東西。 你在 iTunes Connect 里創(chuàng)建和配置產(chǎn)品,然后你的應用程序使用 SKProduct 和 SKProctsRequest 類跟產(chǎn)品交互。

Understanding What You Can Sell Using In-App Purchase

一、了解什么產(chǎn)品你可以使用內(nèi)置購買出售

You can use In-App Purchase to sell content, app functionality, and services.

你可以使用內(nèi)置購買出售內(nèi)容,應用功能和服務。

  • Content. Deliver digital content or assets, such as magazines, photos, and artwork. Content can also be used by the app itself—for example, additional characters and levels in a game, filters in a camera app, and stationery in a word processor.

內(nèi)容。傳遞數(shù)字內(nèi)容或資產(chǎn),比如雜志,相片和藝術(shù)品。 內(nèi)容還可以被應用自己使用--比如,游戲中額外的角色和關(guān)卡,一個照相機應用的濾鏡以及一個文本處理器的文具(stationery)。

  • App functionality. Unlock behavior and expand features you’ve already delivered. Examples include a free game that offers multiplayer mode as an in-app purchase and a free weather app that lets users make a one-time purchase to remove ads.

應用功能。解鎖你已經(jīng)傳遞的行為和擴展功能。 比如一個免費游戲中提供一個多人模式作為一個內(nèi)置購買產(chǎn)品,以及一個免費的天氣應用提供一個內(nèi)置購買讓用戶移除廣告。

  • Services. Have users pay for one-time services such as voice transcription and for ongoing services such as access to a collection of data.

服務。用戶支付一次性服務比如聲音的轉(zhuǎn)錄,用戶支付長期服務比如訪問一個數(shù)據(jù)集。

You can’t use In-App Purchase to sell real-world goods and services or to sell unsuitable content.

你不能用內(nèi)置購買出售真實世界物品和服務或者出售不恰當?shù)膬?nèi)容。

  • Real-world goods and services. You must deliver a digital good or service within your app when using In-App Purchase. Use a different payment mechanism to let your users buy real-world goods and services in your app, such as a credit card or payment service.

真實世界物品和服務。當你使用內(nèi)置購買時,你必須在應用程序里傳遞一個數(shù)字物品或服務。 使用一個不同的支付機制讓你的用戶在應用中購買真實世界物品和服務,比如信用卡或支付服務。

  • Unsuitable content. Don’t use In-App Purchase to sell content that the isn’t allowed by the App Review Guidelines—for example, pornography, hate speech, or defamation.

不恰當?shù)膬?nèi)容。 不要使用內(nèi)置購買來出售應用程序?qū)徍藰藴式沟膬?nèi)容---比如,色情,仇恨言論或者誹謗。

For detailed information about what you can offer using In-App Purchase, see your license agreement and the App Review Guidelines. Reviewing the guidelines carefully before you start coding helps you avoid delays and rejection during the review process. If the guidelines don’t address your case in sufficient detail, you can ask the App Review team specific questions using the online contact form.

更多關(guān)于使用內(nèi)置購買可以提供的內(nèi)容,請看 your license agreement and the App Review Guidelines. 在開始編碼之前仔細閱讀審核指南可以幫你免除審核過程中德延遲和拒絕。 如果指南不涉及你需要的細節(jié),你可以使用 online contact form 詢問應用審核團隊特定的問題。

After you know what products you want to sell in your app and determine that In-App Purchase is the appropriate way to sell those products, you need to create the products in iTunes Connect.

當你知道你想要在應用程序中出售什么并確定內(nèi)置購買時出售那些產(chǎn)品的恰當方式后,你需要在 iTunes Connect 中創(chuàng)建產(chǎn)品。

Creating Products in iTunes Connect

二、在 iTunes Connect 中創(chuàng)建產(chǎn)品

Before you start coding, you need to configure products in iTunes Connect for your app to interact with. As you develop your app, you can add and remove products and refine or reconfigure your existing products.

在開始編碼之前,你需要在 iTunes Connect 中為你的應用程序配置與之交互的產(chǎn)品。 當你開發(fā)應用程序時,你可以添加和刪除產(chǎn)品以及改進或重新配置你現(xiàn)有的產(chǎn)品。

Every product is associated with a specific app. Products created for use by one app are not available in other apps. Companion apps on a different platform are different apps—the products of the Mac app are not available in the iOS app and vice versa.

每個產(chǎn)品都跟一個特定的應用程序相關(guān)聯(lián)。 一個產(chǎn)品只對應一個應用程序,它不能被別的應用程序使用。在不同平臺上的兄弟應用是不同的應用程序--Mac應用程序的產(chǎn)品在 iOS 等中是無法工作的。

Products are reviewed when you submit your app as part of the app review process. Before users can buy a product, it must be approved by the reviewer and you must mark it as “cleared for sale” in iTunes Connect.

當你遞交應用時,產(chǎn)品會作為應用審核的一部分進行審核。 在用戶可以購買一個產(chǎn)品之前,它必須通過審核并在 iTunes Connect 中標記為“cleared for sale”。

For step-be-step information about working with products in iTunes Connect, In-App Purchase Configuration Guide for iTunes Connect.

關(guān)于跟 iTunes Connect 中產(chǎn)品合作的更多信息,請看In-App Purchase Configuration Guide for iTunes Connect.

Product Types

三、產(chǎn)品類型

Product types let you use In-App Purchase in a range of apps by providing several different product behaviors. In iTunes Connect, you select one of the following product types:

產(chǎn)品類型通過提供一些不同的產(chǎn)品行為,讓你在特定的應用程序范圍內(nèi)使用內(nèi)置購買。 在 iTunes Connect 中,你可以選擇以下產(chǎn)品類型:

  • Consumable products. Items that get used up over the course of running your app. Examples include minutes for a Voice over IP app and one-time services such as voice transcription.

耗材產(chǎn)品。應用程序運行過程中會耗盡的產(chǎn)品。 比如,包括一個幾分鐘的 IP 語音應用和一次性服務比如錄音。

  • Non-consumable products. Items that remain available to the user indefinitely on all of the user’s devices. They’re made available to all of the user’s devices. Examples include content, such as books and game levels, and additional app functionality.

非耗材產(chǎn)品。 所有用戶設備上都能一直保持可用狀態(tài)的產(chǎn)品。它們對于用戶的所有設備都一樣可用。例子包括內(nèi)容,比如書和游戲關(guān)卡,以及更多地應用功能。

  • Auto-renewable subscriptions. Episodic content. Like non-consumable products, auto-renewable subscriptions remain available to the user indefinitely on all of the user’s devices. Unlike non-consumable products, auto-renewable subscriptions have an expiration date. You deliver new content regularly, and users get access to content published during the time period their subscription is active. When an auto-renewable subscription is about to expire, the system automatically renews it on the user’s behalf.

    自動再生訂閱。 章節(jié)內(nèi)容, 就像非耗材產(chǎn)品,自動再生訂閱在用戶設備上也是永久可用。不同于非耗材產(chǎn)品的是,自動再生訂閱它有過期時間。 你定期傳遞新的內(nèi)容,用戶在它們的訂閱有效期間可以訪問出版的內(nèi)容。當一個自動再生訂閱就要到期時,系統(tǒng)自動以用戶的名義續(xù)訂它。

  • Non-renewable subscriptions. Subscriptions that don’t involve delivering episodic content. Examples include access to a database of historic photos or a collection of flight maps. It’s your app’s responsibility to make the subscription available on all of the user’s devices and to let users restore the purchase. This product type is often used when your users already have an account on your server that you can use to identify them when restoring content. Expiration and the duration of the subscription are also left to your app (or your server) to implement and enforce.

非再生訂閱。 不涉及傳遞章節(jié)內(nèi)容的訂閱。例子包括訪問一個歷史照片的數(shù)據(jù)庫或者一個航班表。 你有責任讓訂閱在所有用戶的設備都可用,并且讓用戶恢復購買。 該產(chǎn)品類型通常在用戶已經(jīng)在你的服務器上有一個賬號,你可以在用戶恢復內(nèi)容時用它認證他們。 到期和認購時間也保留在你的應用(或服務器)中以供實現(xiàn)和執(zhí)行。

  • Free subscriptions. A way to put free subscription content in Newsstand. After a user signs up for a free subscription, the content is available on all devices associated with the user’s Apple ID. Free subscriptions don’t expire and can be offered only in Newsstand-enabled apps.

免費訂閱。 一種在報刊雜志中投放免費訂閱的方法。 當用戶注冊了一個免費訂閱后,訂閱內(nèi)容在用戶的 Apple ID 相關(guān)的所有設備中都是可用的。 免費訂閱不會到期,只能在開啟報刊雜志的應用中提供。

Differences Between Product Types

四、產(chǎn)品類型之間的區(qū)別 Each product type is designed for a particular use. The behavior of different product types varies in certain ways, as summarized in Table 1-1 and Table 1-2.

每個產(chǎn)品類型被設計用于特定用途。不同產(chǎn)品類型的行為在特定方式中會發(fā)生變化,如表格1-1,1-2中所述。

http://wiki.jikexueyuan.com/project/in-app-purchase/images/3.png" alt="" />

Products that expire or get used up—consumable products, auto-renewable subscriptions, and non-renewing subscriptions—can be purchased multiple times to get the consumable item again or extend the subscription. Non-consumable products and free subscriptions unlock content that remains available to the user indefinitely, so these can only be purchased once.

到期或耗盡產(chǎn)品--耗材產(chǎn)品,自動再生訂閱以及非再生訂閱--可以多次購買以再次獲取耗材產(chǎn)品或者續(xù)訂。 非耗材產(chǎn)品和免費訂閱會永久的讓產(chǎn)品保持有用,所以它們只需購買一次。

Consumable products and non-renewing subscriptions appear in the receipt after being purchased but are removed the next time the receipt is updated, as discussed in more detail in “Persisting Using the App Receipt.” All other types of products have an entry in the receipt that isn’t removed.

耗材產(chǎn)品和非再生訂閱在購買了之后在 receipt 那出現(xiàn),但是它們將在 receipt 下次更新時被刪除,更多詳情請看 “Persisting Using the App Receipt.” 剩余產(chǎn)品類型在 receipt 那都有一個條目(entry)并且不會被刪除。

Consumable products, by their nature, aren’t synced or restored. Users understand that, for example, buying ten more bubbles on their iPhone doesn’t also give them ten more bubbles on their iPad. All other types of products are made available across all of the user’s devices. They’re also restored so users can continue to access their purchased content even after buying a new device. Store Kit handles the syncing and restoring process for auto-renewable and free subscriptions and for non-consumable products.

耗材產(chǎn)品,通常不同步或不能恢復。就是說,在 iPhone 上購買了10個氣球,并不表示 iPad 也得給它們10個氣球。所有其它產(chǎn)品類型都可以跨平臺使用。 它們還可以恢復,所以用戶可以繼續(xù)訪問它們購買的內(nèi)容,即使它換了一個新設備。 商店 Kit 處理同步,為自動再生,免費訂閱和非耗材產(chǎn)品處理恢復。

Non-renewing subscriptions differ from auto-renewable subscriptions in a few key ways. These differences give your app the flexibility to implement the correct behavior for your needs, as follows:

非再生訂閱與自動再生訂閱在一些關(guān)鍵方法上有所不同。這些不同讓你的應用可以靈活地根據(jù)需要實現(xiàn)正確的行為,如下:

  • Your app is responsible for calculating the time period that the subscription is active and determining what content needs to be made available to the user.

應用程序負責計算訂閱有效的時間并且決定什么內(nèi)容需要開放給用戶。

  • Your app is responsible for detecting that a subscription is approaching its expiration date and prompting the user to renew the subscription by purchasing the product again.

應用程序負責偵測訂閱即將到期,提醒用戶再次購買產(chǎn)品來更新訂閱。

  • Your app is responsible for making subscriptions available across all the user’s devices after they’re purchased and for letting users restore past purchases. For example, most subscriptions are provided by a server; your server would need some mechanism to identify users and associate subscription purchases with the user who purchased them.

應用程序負責用戶購買成功后讓訂閱能夠跨平臺使用,并且讓用戶恢復過去的購買記錄。 比如,大多數(shù)訂閱都有一個服務器提供;你得服務器將需要一些機制來認證用戶并把購買的訂閱跟用戶關(guān)聯(lián)到一起。