CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

SimpleStore 1.0.4

SimpleStore 1.0.4

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Henrik Panhans.



SimpleStore

A lightweight wrapper class to perform in-app purchases.

To install simply add pod 'SimpleStore' to your Podfile or github "SwiftyJSON/SwiftyJSON" to your Cartfile

Usage:

import SimpleStore

var store = SimpleStore(with: [String])

store.delegate = self //see delegate methods below

The following functions are available:

store.checkIfPaymentPossible() //refreshes the canMakePayments Boolean

store.requestProductInfo(withIDs: [String])

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

Properties

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

Delegate Methods

func purchaseDidSucceed(with id: String) {}

func purchaseDidRestore(with id: String) {}

func purchaseDidFail(with id: String) {}

If you have any suggestion or improvements, feel free to contribute :)