Swiftpack.co - iridescent-dev/iap-swift-lib as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
An easy-to-use Swift library for In-App Purchases, using Fovea.Billing for receipts validation.
.package(url: "https://github.com/iridescent-dev/iap-swift-lib.git", from: "1.0.4")

An easy-to-use Swift library for In-App Purchases, using Fovea.Billing for receipts validation.


  • ✅ Purchase a product
  • ✅ Restore purchased products
  • ✅ Verify transactions with the App Store on Fovea.Billing server
  • ✅ Handle and notify payment transaction states
  • ✅ Retreive products information from the App Store
  • ✅ Support all product types (consumable, non-consumable, auto-renewable subscription, non-renewing subscription)
  • ✅ Status of purchases available when offline
  • ✅ Server integration with a Webhook

Basic Usage

This Swift Package is very quick to install and very easy to use. Let's see the basic usage and go to the documentation for more information.

  • Initialize the library
    iapProducts: [ IAPProduct(productIdentifier: "my_product", productType: .nonConsumable) ],
    validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=demo&apiKey=12345678"
  • Stop library when the application will terminate
  • Display product information
guard let product: SKProduct = InAppPurchase.getProductBy(identifier: "my_product") else { return }
productTitleLabel.text = product.localizedTitle
productDescriptionLabel.text = product.localizedDescription
productPriceLabel.text = product.localizedPrice
  • Initialize a purchase
    productIdentifier: "my_product",
    callback: { result in
  • Unlock purchased content
if InAppPurchase.hasActivePurchase(for: "my_product") {
    // display content related to the product
  • Restore purchases
    callback: { result in


See also:

Xcode Demo Project

Do not hesitate to check the demo project available on here: iap-swift-lib-demo.


Generate the documentation, using Jazzy, just by running jazzy from the root of the project.


Common issues are covered here: https://github.com/iridescent-dev/iap-swift-lib/wiki/Troubleshooting


InAppPurchaseLib is open-sourced library licensed under the MIT License. See LICENSE for details.


Stars: 3
Last commit: 3 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics