Latest | 0.9.6 |
---|---|
Homepage | https://github.com/sandorgyulai/InAppFramework |
License | MIT |
Platforms | ios 8.0, requires ARC |
Frameworks | UIKit |
Authors |
InAppFramework
In App Purchase Manager framework for iOS
Disclaimer
I know it’s been too long since the last update, quite a few things happened in my life, but now I am back again and started with a nice update for Swift 4.2 compatibility. More to come, stay tuned!
ToDo for 1.0
- ☐ Documentation!! Work in progress
- ☐ Change productPurchased(productIdentifier: String) -> Bool to return Tuple with 2 bools to replace hasValidReceipt property
- ☑︎ Change NSURLConnection to NSURLSession
Installation
CocoaPods
pod 'InAppFw'
Usage
First you should add product IDs:
InAppFw.sharedInstance.addProductId(String)
InAppFw.sharedInstance.addProductIds([String])
Then you can request them from the Apple servers:
InAppFw.sharedInstance.requestProducts(completionHandler: (success: Bool, products: [SKProduct]?)
Make purchases:
InAppFw.sharedInstance.purchaseProduct(SKProduct)
Restore purchases:
InAppFw.sharedInstance.restoreCompletedTransactions()
Register for notifications:
- kIAPPurchasedNotification
- kIAPFailedNotification
Load the previously purchased products:
InAppFw.sharedInstance.loadPurchasedProducts(checkWithApple: Bool, completion: ((valid: Bool) -> Void)?)
checkWithApple
: if true
, will validate the Purchase receipt with Apple Servers too. The completion will be only true if the receipt is valid.
Latest podspec
{ "name": "InAppFw", "platforms": { "ios": "8.0" }, "summary": "In App Purchase Manager framework for iOS", "requires_arc": true, "version": "0.9.6", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "Sandor Gyulai": "[email protected]" }, "homepage": "https://github.com/sandorgyulai/InAppFramework", "source": { "git": "https://github.com/sandorgyulai/InAppFramework.git", "tag": "0.9.6" }, "frameworks": "UIKit", "source_files": "InAppFw/**/*.{swift}", "swift_version": "4.2" }
Sat, 15 Dec 2018 11:53:07 +0000