---
title: "What does StoreKitError.unknown mean?"
description: "StoreKitError.unknown is StoreKit 2's catch-all for an error it cannot name. Log the full error, retry once and see how the purchases SDK reports it."
url: https://revenuedot.app/docs/errors/storekit-error-unknown
---

# What does StoreKitError.unknown mean?

StoreKitError.unknown is StoreKit 2's catch-all for a failure it has no better name for.

## Quick facts

| | |
|---|---|
| Error | `StoreKitError.unknown` |
| Where | StoreKit 2, Swift (`StoreKitError`) |
| Available since | iOS 15.0, iPadOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, visionOS 1.0 |
| What the vendor says | An unknown error occurred. |

## Cause

- StoreKit raised an error that none of the other `StoreKitError` cases describes. Apple gives no cause, and the case carries no underlying error.
- The RevenueCat SDK source notes that `StoreKitError` does not conform to `CustomNSError` as of iOS 15.2, so no extra detail can be read from it ([StoreKitError+Extensions.swift](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Error%20Handling/StoreKitError%2BExtensions.swift)).
- Because nothing more is known, the cause can be a device problem, a store problem or a configuration problem.

## Fix

1. Log the full error value, the product ID and the iOS version, so repeated cases can be grouped.
2. Retry once after a short pause, and test on a second device and account.
3. Check the basics: the device is signed in to the App Store, the product exists in App Store Connect and the app is the build you think it is.
4. Update to the newest SDK and Xcode, because a case Apple adds later can reach older code as unknown.

## Example

```swift
import StoreKit

// With no detail to read, log everything you have, then show a neutral message.
func buy(_ product: Product) async {
    do {
        _ = try await product.purchase()
    } catch StoreKitError.unknown {
        print("StoreKit unknown error for \(product.id) on \(ProcessInfo.processInfo.operatingSystemVersionString)")
    } catch {
        print("Purchase failed: \(error)")
    }
}
```

*Compile-checked: `npm run check:snippets` type-checks this snippet with `swiftc` against the Apple SDK (macOS target, checked 2026-10-03).*

## How the RevenueDot SDK reports it

The RevenueDot `purchases-ios` fork maps `StoreKitError.unknown` to `ErrorCode.storeProblemError` (code 2), not to `unknownError`. See [what storeProblemError means](https://revenuedot.app/docs/errors/sdk-store-problem-error.md) and [what unknownError means](https://revenuedot.app/docs/errors/sdk-unknown-error.md).

## Related

- [What does storeProblemError (code 2) mean in the purchases SDK?](https://revenuedot.app/docs/errors/sdk-store-problem-error.md)
- [What does StoreKitError.systemError mean?](https://revenuedot.app/docs/errors/storekit-error-system-error.md)
- [What does unknownError (code 0) mean in the purchases SDK?](https://revenuedot.app/docs/errors/sdk-unknown-error.md)

## Source

- [Apple: StoreKitError.unknown](https://developer.apple.com/documentation/storekit/storekiterror/unknown)
- [RevenueDot purchases-ios: StoreKitError+Extensions.swift (how the SDK maps StoreKit 2 errors)](https://github.com/revenuedot/purchases-ios/blob/revenuedot/main-patches/Sources/Error%20Handling/StoreKitError%2BExtensions.swift)

Checked: 2026-10-03
