Swift implementation of the OpenIAP specification for iOS, macOS, tvOS, and watchOS.
Visit openiap.dev for complete documentation, API reference, guides, and examples.
- 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 | 15.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'Check
openiap-versions.jsonfor the current version.
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.
MIT License - see LICENSE for details.