TPInAppReceipt
A lightweight, pure-Swift library for reading and validating Apple In-App Purchase receipts locally, without sending them to a server.
TPInAppReceipt is a Swift library for reading and validating Apple In-App Purchase receipts entirely on-device. It decodes a local receipt or one supplied as raw data, then exposes its fields so an app can check purchases, active subscriptions, and introductory-offer eligibility.
Its default validation checks the certificate chain, signature, hash, and metadata, and returns a valid or invalid result with the specific error when validation fails; custom validators can be added through a verifier builder. A blocking variant of the API is available for contexts where async calls are not an option.
It installs through the Swift Package Manager and supports Swift 6 across macOS, iOS, tvOS, watchOS, and visionOS, under the MIT license.