Swift implementation of the OpenIAP specification for iOS, macOS, tvOS, and watchOS.
Visit openiap.dev for complete documentation, API reference, guides, and examples.
Link an independent provider and set the app's dev.hyo.openiap.PROVIDER
Info.plist key to its Objective-C factory class name. OpenIapModule selects
that provider; without the key, it uses Apple App Store. Invalid explicit
configuration fails at connection.
Providers implement OpenIapModuleProtocol and OpenIapProviderFactory against
the public OpenIAP product. Apple and Android factories expose the same
Client Protocol descriptor and preserve concrete purchase identity.
Follow the provider guide
for factory versions, Release linking and the public Swift conformance suite.
- StoreKit 2 support (iOS 15+)
- Cross-platform (iOS, macOS, tvOS, watchOS)
- Thread-safe with MainActor isolation
- Automatic transaction verification
- Event-driven purchase observation
| Platform | Minimum Version |
|---|---|
| iOS | 15.0+ |
| macOS | 14.0+ |
| tvOS | 16.0+ |
| watchOS | 8.0+ |
| Swift | 5.9+ |
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/hyodotdev/openiap.git", from: "<version>")
]Add to your Podfile:
pod 'openiap', '~> <version>'CocoaPods Trunk stops accepting new versions on December 2, 2026; OpenIAP versions after that ship through Swift Package Manager only.
Use the latest version from the Swift Package badge above.
import OpenIAP
let module = OpenIapModule.shared
// Initialize connection
_ = try await module.initConnection()
// Fetch products
let products = try await module.fetchProducts(
ProductRequest(skus: ["premium", "coins"], type: .all)
)
// End connection when done
_ = try await module.endConnection()For detailed usage, see the documentation.
Thank you to Meta, Amazon Developer, and Codemagic for supporting OpenIAP. View sponsorship options.
Claude for Open Source provides the Claude Ultra plan for the maintainer for 6 months.
Codemagic provides infrastructure support for OpenIAP.
We also recognize sponsors and backers through OpenCollective. The original react-native-iap collective now supports the broader OpenIAP ecosystem and is managed separately from the main sponsor program.
Become a sponsor | Become a backer
Supported the project before the OpenIAP sponsor program: Nami for 30 months and Courier for 1 month.
MIT License - see LICENSE for details.
