SDK error · code 38

featureNotSupportedWithStoreKit1 (error code 38): Feature not supported with StoreKit 1

What it means

featureNotSupportedWithStoreKit1 (code 38) means an iOS feature needs StoreKit 2, but the SDK is running in StoreKit 1 mode. Win-back offer eligibility and the restore-behavior check raise it. Switch the SDK to StoreKit 2, which is its default, and make sure your In-App Purchase key is set on the server.

Code

38

iOS (Swift)

ErrorCode.featureNotSupportedWithStoreKit1

Android (Kotlin)

No matching code in the Android SDK; see the causes below.

Causes

Why the SDK returns featureNotSupportedWithStoreKit1

  • eligibleWinBackOffers(forProduct:) was called while the SDK runs StoreKit 1, or without StoreKit 2 available (PurchasesOrchestrator.swift).
  • isPurchaseAllowedByRestoreBehavior was called with StoreKit 1 selected.
  • The configuration forces .storeKit1, while the SDK's default is StoreKit 2 (StoreKitVersion.swift).
  • Android has no member for this code. StoreKit versions are an Apple concept.

Fix

How to fix featureNotSupportedWithStoreKit1

  1. 01

    Use StoreKit 2

    Remove any .with(storeKitVersion: .storeKit1) from your configuration, or set .storeKit2.

  2. 02

    Add the In-App Purchase key

    StoreKit 2 mode needs an In-App Purchase key configured for the app. See invalidAppleSubscriptionKeyError.

  3. 03

    Check the OS version

    Win-back offers need a recent OS (iOS 18 or later in the SDK source). On older systems the call is unavailable.

  4. 04

    Guard the call

    Hide the feature when the SDK runs StoreKit 1.

In your app

How to handle it in code

  • Do not retry. The mode stays the same until the configuration changes.
  • Hide the feature in StoreKit 1 builds, and do not show an error to customers.
  • Do not grant access from the error.
Match the errorSwift
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .featureNotSupportedWithStoreKit1 {
  // handle feature not supported with storekit 1
}

On RevenueDot: For the restore-behavior check, POST /v1/subscribers/{id}/restore/eligibility always answers that a purchase is allowed. Who owns a restored purchase is decided later, by the project's transfer behavior. See how to restore purchases.

FAQ

featureNotSupportedWithStoreKit1: questions people ask

How do I switch the SDK to StoreKit 2?

Leave the default, which is StoreKit 2, or call .with(storeKitVersion: .storeKit2) on the configuration builder. Add the In-App Purchase key to the app on the server.

Which features need StoreKit 2?

In the SDK source, win-back offer eligibility and the restore-behavior check throw this error under StoreKit 1.

How do I check for featureNotSupportedWithStoreKit1 in React Native and Flutter?

The React Native PURCHASES_ERROR_CODE enum in the SDK source has no member for it, so compare error.code with the string "38". In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.featureNotSupportedWithStoreKit1.

Get started

Keep the RevenueCat SDK. Change the backend.

RevenueDot answers the same SDK calls with the same error codes. Start free on RevenueDot Cloud, free up to $10,000 a month in tracked revenue.

Already have an account? Sign in · Prefer your own servers? Self-host free