Demo iOS Classes

Classes

IosInAppPurchaseProductA product registered in the store.
IosInAppPurchaseTransactionContains information about a transaction in the external app store.
IosInAppPurchaseBackendComminucates with external store.

Check out Base Classes which include InAppProduct, InAppStore, InAppTransaction and InAppPurchaseBackend

IosInAppPurchaseProduct

IosInAppPurchaseProduct adds purchase() for initializing purchasing process.

IosInAppPurchaseTransaction

IosInAppPurchaseTransaction adds new parameters and return types. Transaction error handling is implemented on IosInAppPurchaseTransaction's constructor. The class has the finalize() function that finalizes the transaction.

IosInAppPurchaseBackend

IosInAppPurchaseBackend uses Objective-C language to communicate with the App Store.

Initializing the products

This class shows the product's information on the store page.

  1. IosInAppPurchaseBackend is called from InAppStore::setupBackend().
  2. At initialization IosInAppPurchaseBackend creates InAppPurchaseManager with Objective-C.
  3. InAppStore::registerProduct(productType, &identifier) function is called and queryProduct() is executed in the back end.
  4. Objective-C function requestProductData:() is called and will make SKProductRequest.
  5. After SKProductRequest is finished and product objects has been created in Objective-C productsRequest:(), products will be registered by the IosInAppPurchaseBackend::registerProduct() function.
  6. Signal productQueryDone() will be emitted and the item's information will be visible on the application's store page.

Purchasing process

  1. The user presses one of the products on the applications store page.
  2. IosInAppPurchaseProduct::purchase() function is called and payment is added to the SKPaymentQueue in the Objective-C function paymentQueue:() in IosInAppPurchaseBackend.
  3. Purchase confirmation pop-up is launched for the user.

© 2022 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.