데모 iOS 클래스

클래스

IosInApp구매제품스토어에 등록된 제품입니다.
IosInApp구매거래외부 앱스토어의 트랜잭션에 대한 정보를 포함합니다.
IosInApp구매백엔드외부 스토어와 연동합니다.

인앱프로덕트, 인앱스토어, 인앱트랜잭션, 인앱구매백엔드를 포함하는 베이스 클래스를 확인하세요.

IosInAppPurchaseProduct

IosInAppPurchaseProduct는 구매 프로세스를 초기화하기 위해 purchase()를 추가합니다.

IosInAppPurchaseTransaction

IosInAppPurchaseTransaction은 새로운 파라미터와 반환 유형을 추가합니다. 트랜잭션 오류 처리는 IosInAppPurchaseTransaction의 생성자에서 구현됩니다. 이 클래스에는 트랜잭션을 마무리하는 finalize() 함수가 있습니다.

IosInAppPurchaseBackend

IosInAppPurchaseBackend는 Objective-C 언어를 사용하여 앱스토어와 통신합니다.

제품 초기화

이 클래스는 스토어 페이지에 제품 정보를 표시합니다.

  1. IosInAppPurchaseBackend는 InAppStore::setupBackend()에서 호출됩니다.
  2. 초기화 시 IosInAppPurchaseBackend는 Objective-C로 InAppPurchaseManager를 생성합니다.
  3. InAppStore::registerProduct(productType, &identifier) 함수가 호출되고 백엔드에서 쿼리프로덕트()가 실행됩니다.
  4. Objective-C 함수 requestProductData:()가 호출되어 SKProductRequest를 생성합니다.
  5. SKProductRequest가 완료되고 Objective-C productsRequest:()에서 제품 객체가 생성되면, IosInAppPurchaseBackend::registerProduct() 함수에 의해 제품이 등록됩니다.
  6. 제품 쿼리 완료() 신호가 발생하고 애플리케이션의 스토어 페이지에 상품 정보가 표시됩니다.

구매 프로세스

  1. 사용자가 애플리케이션 스토어 페이지에서 제품 중 하나를 누릅니다.
  2. IosInAppPurchaseProduct::purchase() 함수가 호출되고 IosInAppPurchaseBackend의 Objective-C 함수 paymentQueue:()에서 SKPaymentQueue 에 결제가 추가됩니다.
  3. 사용자에게 구매 확인 팝업이 실행됩니다.

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