SimpleStore 1.0.4

SimpleStore 1.0.4

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2017年3月
SwiftSwift 版本3.0
SPM支持 SPM

Henrik Panhans 维护。



SimpleStore

一个轻量级包装类,用于执行应用内购买。

要安装,只需将 pod 'SimpleStore' 添加到您的 Podfile,或将 github "SwiftyJSON/SwiftyJSON" 添加到您的 Cartfile。

用法

import SimpleStore

var store = SimpleStore(with: [String])

store.delegate = self //see delegate methods below

以下是一些可用的函数

store.checkIfPaymentPossible() //refreshes the canMakePayments Boolean

store.requestProductInfo(withIDs: [String])

store.buyProduct(withID: String) // I recommend using an enum for this

属性

var productIDs = [String]()
var products = [String : SKProduct]()
var canMakePayments = true
var delegate: SimpleStoreDelegate?

委托方法

func purchaseDidSucceed(with id: String) {}

func purchaseDidRestore(with id: String) {}

func purchaseDidFail(with id: String) {}

如果您有任何建议或改进,请随时贡献:)