iOSデモクラス
クラス
IosInAppPurchaseProduct | ストアに登録された商品。 |
IosInAppPurchaseTransaction | 外部アプリストアのトランザクションに関する情報を含む。 |
IosInAppPurchaseBackend | 外部ストアと通信します。 |
InAppProduct、InAppStore、InAppTransaction、およびInAppPurchaseBackendを含むベースクラスを確認してください。
IosInAppPurchaseProduct
IosInAppPurchaseProductは、購買プロセスを初期化するためにpurchase()を追加します。
IosInAppPurchaseTransaction
IosInAppPurchaseTransaction に新しいパラメータと戻り値の型が追加されました。トランザクション・エラー処理は IosInAppPurchaseTransaction のコンストラクタに実装されています。このクラスには、トランザクションを確定する finalize() 関数があります。
IosInAppPurchaseBackend
IosInAppPurchaseBackend はObjective-C言語を使用して App Store と通信します。
商品の初期化
このクラスは、商品の情報をストアページに表示します。
- IosInAppPurchaseBackendは、InAppStore::setupBackend()から呼び出されます。
- 初期化時にIosInAppPurchaseBackendはObjective-CでInAppPurchaseManagerを作成します。
- InAppStore::registerProduct(productType,&identifier)関数が呼び出され、バックエンドでqueryProduct()が実行されます。
- Objective-Cの関数requestProductData:()が呼び出され、SKProductRequestが作成されます。
- SKProductRequestが終了し、Objective-CのproductsRequest:()で商品オブジェクトが作成されると、IosInAppPurchaseBackend::registerProduct()関数によって商品が登録されます。
- シグナルproductQueryDone()が発行され、商品の情報がアプリケーションのストアページに表示されます。
購入プロセス
- ユーザーは、アプリケーションのストアページで商品の1つを押します。
IosInAppPurchaseProduct::purchase()
関数が呼び出され、IosInAppPurchaseBackendのObjective-C関数paymentQueue:()の 。SKPaymentQueue
- 購入確認のポップアップがユーザーに表示されます。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.