See InAppPurchaseLib on GitHub: iap-swift-lib.
- Configure your App and Xcode to support In-App Purchases.
- Create and configure your Fovea.Billing project account:
- Set your bundle ID
- The iOS Shared Secret (or shared key) is to be retrieved from AppStoreConnect
- The iOS Subscription Status URL (only if you want subscriptions)
-
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" )
-
InAppPurchaseLib is open-sourced library licensed under the MIT License. See LICENSE for details.