Skip to content

Latest commit

 

History

History

apple

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.

Community store providers

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.

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 16.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>'

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.

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.

Sponsors

Meta        Amazon Developer        Codemagic

Thank you to Meta, Amazon Developer, and Codemagic for supporting OpenIAP. View sponsorship options.

In-kind support

Claude      Codemagic

Claude for Open Source provides the Claude Ultra plan for the maintainer for 6 months.
Codemagic provides infrastructure support for OpenIAP.

OpenCollective

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.

Sponsors: OpenCollective sponsors

Backers: OpenCollective backers

Become a sponsor | Become a backer

Past supporters

Supported the project before the OpenIAP sponsor program: Nami for 30 months and Courier for 1 month.

Nami      Courier

License

MIT License - see LICENSE for details.

Support