SwiftBindings.Apple.StoreKit2
26.2.8
dotnet add package SwiftBindings.Apple.StoreKit2 --version 26.2.8
NuGet\Install-Package SwiftBindings.Apple.StoreKit2 -Version 26.2.8
<PackageReference Include="SwiftBindings.Apple.StoreKit2" Version="26.2.8" />
<PackageVersion Include="SwiftBindings.Apple.StoreKit2" Version="26.2.8" />
<PackageReference Include="SwiftBindings.Apple.StoreKit2" />
paket add SwiftBindings.Apple.StoreKit2 --version 26.2.8
#r "nuget: SwiftBindings.Apple.StoreKit2, 26.2.8"
#:package SwiftBindings.Apple.StoreKit2@26.2.8
#addin nuget:?package=SwiftBindings.Apple.StoreKit2&version=26.2.8
#tool nuget:?package=SwiftBindings.Apple.StoreKit2&version=26.2.8
SwiftBindings.Apple.StoreKit2
Native .NET bindings for Apple's StoreKit 2 — the Swift-first In-App Purchase API on top of StoreKit. These are not Objective-C proxy wrappers; they use .NET 10's native Swift interop for direct, high-performance calls into Swift APIs from C#.
📖 Full usage guide → — Swift→C# naming, the complete purchase lifecycle, subscriptions, transaction verification, and error handling.
Installation
dotnet add package SwiftBindings.Apple.StoreKit2
Requirements
- .NET 10.0+
- iOS 26.2+, macOS 26.2+, Mac Catalyst 26.2+, tvOS 26.2+
- macOS host for development
- App Store Connect-configured products for live purchase flows; a StoreKit configuration file works for local testing
Usage
Capability checks
using StoreKit2;
bool canBuy = AppStore.CanMakePayments;
Guid? deviceVerifyId = AppStore.DeviceVerificationID;
Async transaction sequences
var allTransactions = Transaction.All;
var entitlements = Transaction.CurrentEntitlements;
var unfinished = Transaction.Unfinished;
var updates = Transaction.Updates;
Verifying a transaction payload
// VerificationResult<T> projects to TryGet-style C# methods.
// (You'll get a real instance from any of the async sequences above.)
if (result.TryGetVerified(out Transaction tx))
{
// tx is the verified payload
}
else if (result.TryGetUnverified(out Transaction unverifiedTx, out var error))
{
// unverifiedTx + the verification error are exposed
}
Errors
var description = Product.PurchaseError.InvalidQuantity.GetErrorDescription();
var refundDesc = Transaction.RefundRequestError.DuplicateRequest.GetErrorDescription();
Documentation
- Usage guide (wiki) — full C# walkthrough of the binding surface
- Apple StoreKit framework
- In-App Purchase
How It Works
These bindings are auto-generated by Swift Dotnet Bindings using .NET 10's native Swift interop via the SwiftBindings SDK.
License
The bindings are MIT licensed. StoreKit is part of the Apple SDK; refer to Apple's licensing for the underlying framework.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-ios26.2 is compatible. net10.0-maccatalyst26.2 is compatible. net10.0-macos26.2 is compatible. net10.0-tvos26.2 is compatible. |
-
net10.0-ios26.2
- SwiftBindings.Apple (>= 26.2.8)
- SwiftBindings.Runtime (>= 0.16.0 && < 0.17.0)
-
net10.0-maccatalyst26.2
- SwiftBindings.Apple (>= 26.2.8)
- SwiftBindings.Runtime (>= 0.16.0 && < 0.17.0)
-
net10.0-macos26.2
- SwiftBindings.Apple (>= 26.2.8)
- SwiftBindings.Runtime (>= 0.16.0 && < 0.17.0)
-
net10.0-tvos26.2
- SwiftBindings.Apple (>= 26.2.8)
- SwiftBindings.Runtime (>= 0.16.0 && < 0.17.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.