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

內(nèi)置購買

In-App Purchase allows you to embed a store inside your app using the Store Kit framework. This framework connects to the App Store on your app’s behalf to securely process payments from users, prompting them to authorize payment. The framework then notifies your app, which provides the purchased items to users. Use In-App Purchase to collect payment for additional features and content.

內(nèi)置購買使用 Store Kit 框架在應用程序里內(nèi)置一個商店。該框架把你的應用程序的行為連接到應用商店來安全地處理用戶的支付,促使他們授權(quán)支付。 然后框架給你的應用程序發(fā)送通知,該應用程序提供了用戶購買的商品。使用內(nèi)置購買可以為額外的功能和內(nèi)容提供支付。

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

For example, using In-App Purchase, you can implement the following scenarios:

比如,使用內(nèi)置購買,你可以實現(xiàn)以下內(nèi)容:

  • A basic version of your app with additional premium features

一個帶有額外高級功能的應用程序的基礎版本。

  • A magazine app that lets users purchase and download new issues

一個可以讓用戶購買和下載新刊的雜志應用。

  • A game that offers new levels to explore

一個提供新關(guān)卡讓用戶攻克的游戲。

  • An online game that allows players to purchase virtual property

一個允許玩家購買虛擬資產(chǎn)在線游戲。

At a Glance

概論

At a high level, the interactions between the user, your app, and the App Store during the In-App Purchase process take place in three stages, as shown in Figure I-1. First, the user navigates to your app’s store and your app displays its products. Second, the user selects a product to buy and the app requests payment from the App Store. Third, the App Store processes the payment and your app delivers the purchased product.

從高層次來說,內(nèi)置購買過程處理期間,用戶,應用程序和應用商店之間的交互發(fā)生在三個階段,如圖 I-1。首先,用戶導航到你的應用程序商店,你的應用程序顯示其產(chǎn)品。 其次,用戶選擇一個產(chǎn)品購買,應用程序從應用商店請求支付。 最后,應用商店處理該支付,你的應用程序傳遞被購產(chǎn)品。

Figure I-1 Stages of the purchase process 圖 I-1 購買過程的階段

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

You Create and Configure Products in iTunes Connect

在 iTunes Connect 里創(chuàng)建和配置產(chǎn)品

Understanding what kinds of products and behaviors are supported by In-App Purchase lets you design your app and in-app store to make the best use of this technology.

理解內(nèi)置購買支持哪些產(chǎn)品和行為讓你最大化使用該技術(shù)來設計應用程序和內(nèi)置商店。

Relevant Chapter: “Designing Your App’s Products”

相關(guān)章節(jié):“Designing Your App’s Products”

Your App Interacts with the App Store to Sell Products

應用程序跟應用商店交互來出售產(chǎn)品

All apps that use In-App Purchase need to implement the core functionality described in these chapters to let users make purchases and then deliver the purchased products.

所有使用內(nèi)置購買的應用程序都需要實現(xiàn)這些章節(jié)中描述的內(nèi)核功能,讓用戶可以購買然后傳遞已購的產(chǎn)品。

These development tasks need to be done in order. The relevant chapters introduce them in the order you implement them, and they’re listed in full in“Implementation Checklist.” To help plan your development, you may want to read the full checklist before you begin.

這些開發(fā)任務需要按順序完成。 相關(guān)章節(jié)按照你實現(xiàn)它們的順序介紹,它們在“Implementation Checklist.”中有完整列表來幫助你計劃你的開發(fā),你可以在開始前先閱讀完整的清單。

Relevant Chapters: “Retrieving Product Information,” “Requesting Payment,” “Delivering Products”

相關(guān)章節(jié):“Retrieving Product Information,” “Requesting Payment,” “Delivering Products”

Subscriptions Require Additional Application Logic

訂閱需要更多應用邏輯

Apps that offer subscriptions need to keep track of when the user has an active subscription, respond to expiration and renewal, and determine what content the user has access to.

提供訂閱的應用程序需要隨時監(jiān)控用戶何時有一個活動訂閱,響應到期和續(xù)期,然后決定用戶訪問什么內(nèi)容。

Relevant Chapter: “Working with Subscriptions”

相關(guān)章節(jié):“Working with Subscriptions”

Users Can Restore Purchases

用戶可以恢復購買

Users can restore products that they previously purchased—for example, to bring content they’ve already paid for onto their new phone.

用戶可以恢復它們先前已經(jīng)購買的產(chǎn)品--比如,可以把購買產(chǎn)品給新的手機使用。

Relevant Chapter: “Restoring Purchased Products”

相關(guān)章節(jié):“Restoring Purchased Products”

Apps and Products Are Submitted for Review

應用程序和產(chǎn)品需要提交審核

When you’re done developing and testing, you submit your app and your In-App Purchase products for review.

當你完成開發(fā)和測試后,你需要提交你的應用程序和內(nèi)置購買產(chǎn)品以供審核。

Relevant Chapter:“Preparing for App Review”

相關(guān)章節(jié):“Preparing for App Review”

See Also

參見

描述了如何在 iTunes Connect 里創(chuàng)建和配置應用程序的產(chǎn)品。

上一篇:介紹下一篇:恢復購買記錄