Skip to content

Latest commit

 

History

History

README.md

OpenIAP Apple

OpenIAP Apple Logo

Swift implementation of the OpenIAP specification for iOS, macOS, tvOS, and watchOS.


Documentation

Visit openiap.dev for complete documentation, API reference, guides, and examples.

Features

  • StoreKit 2 support (iOS 15+)
  • Cross-platform (iOS, macOS, tvOS, watchOS)
  • Thread-safe with MainActor isolation
  • Automatic transaction verification
  • Event-driven purchase observation

Requirements

Platform Minimum Version
iOS 15.0+
macOS 14.0+
tvOS 15.0+
watchOS 8.0+
Swift 5.9+

Installation

Swift Package Manager

Add to your Package.swift:

dependencies: [
    .package(url: "https://github.com/hyodotdev/openiap.git", from: "$version")
]

CocoaPods

Add to your Podfile:

pod 'openiap', '~> $version'

Check openiap-versions.json for the current version.

Quick Start

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.

License

MIT License - see LICENSE for details.

Support