XCode 16.4 日本語化計画
顧客がアプリ外で購入を開始したときに購入意図を発行する非同期シーケンス。
static var intents: PurchaseIntent.PurchaseIntents { get }
顧客が App Store 上で販売促進対象商品を選択したり、再獲得提供を利用したりして、あなたのアプリ外で購入手続きを開始すると、あなたのアプリは購入意図を受け取ります。product オブジェクトを使用して、購入の完了、商品のロック解除、その他あなたのアプリ固有のワークフローなど、あなたのアプリの購入ワークフローを完了します。
以下のサンプルコードは、購入意図を受け取り、購入ワークフローを完了するメソッドを呼び出します。
func purchaseProduct(_ product: Product) async { // Complete the purchase workflow. do { try await product.purchase() } catch { // Add your code to handle errors. } // Add your code for the remaining purchase workflow. } for await purchaseIntent in PurchaseIntent.intents { // Receive the purchase intent and then complete the purchase workflow. await purchaseProduct(purchaseIntent.product) }
顧客がアプリ外で開始する購入に対する購入意図の非同期シーケンス。