store.* (Apple IAP)

类型
版本 版本 2024.3703
关键词 Apple,IAP,应用内购买
平台 iOS,tvOS

概述

此库允许您支持应用内在 iOS 上购买,包括游戏内货币、升级等。

有关其他平台上的应用内购买,请参阅 Google BillingAmazon IAP 的文档。

备注
  • 这是 Apple store IAP 的旧版本,请使用新的 Apple IAP 插件

  • 要在应用内iOS 上使用购买功能,您必须先配置您的 iOS 证书、App ID 和配置文件。请仔细阅读我们的 配置和构建 指南,因为这是一项重要任务,您必须正确完成每个步骤。另外,请记住创建一个唯一且完全限定的 App ID,而不是通配符 App ID。

  • 必须在 iTunes Connect 中进行其他配置。如果您需要此过程的帮助,请参阅 Apple 的 文档

  • 有关其他功能,请查看 Apple IAP 插件。

语法

local store = require( "store" )

属性

store.target

store.isActive

store.canLoadProducts

store.canMakePurchases

函数

store.init()

store.loadProducts()

store.purchase()

store.finishTransaction()

store.restore()

事件

storeTransaction

productList