/iap-swift-lib-demo

In-App Purchase Swift Library - Xcode Demo Project

Primary LanguageSwiftMIT LicenseMIT

In-App Purchase Swift Library - Xcode Demo Project.

See InAppPurchaseLib on GitHub: iap-swift-lib.

Getting Started

Requirements

Installation

  • Clone iap-swift-lib-demo to your computer and use it in Xcode:

    • Clone or download > Open in Xcode
  • Set your App Store Connect project information:

    • Edit the Bundle Identifier.

    • Open the AppDelegate.swift file to edit product information and Fovea.Billing validation URL.

      InAppPurchase.initialize(
          iapProducts: [
              IAPProduct(productIdentifier: "monthly_plan", productType: .autoRenewableSubscription),
              IAPProduct(productIdentifier: "yearly_plan", productType: .autoRenewableSubscription)
          ],
          iapPurchaseDelegate: PurchaseDelegate(),
          validatorUrlString: "https://validator.fovea.cc/v1/validate?appName=iapdemo&apiKey=12345678"
      )

License

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