神刀安全网

Maniac Dev : Swift Library Providing A Clean And Simple API For In-App Purchases

Last year I mentioned a tutorial showing how to implement renewable purchases with Store Kit .

Here’s an open source Swift library for iOS and OS X providing a simple and clean syntax for in app purchases called SwiftyStoreKit from Andrea Bizzotto.

SwiftyStoreKit enables easy error handling with support for retrieving product info, purchasing products, checking past purchases, and verifying receipts.

SwiftyStoreKit.purchaseProduct("com.musevisions.SwiftyStoreKit.Purchase1") { result in      switch result {      case .Success(let productId):          print("Purchase Success: (productId)")      case .Error(let error):          print("Purchase Failed: (error)")      }  }

Maniac Dev : Swift Library Providing A Clean And Simple API For In-App Purchases

You can find SwiftyStoreKit on Github here .

A great library for working with StoreKit.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Maniac Dev : Swift Library Providing A Clean And Simple API For In-App Purchases

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮