Code
38
SDK error · code 38
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.feature
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
eligibleWinBackOffers(forProduct:) was called while the SDK runs StoreKit 1, or without StoreKit 2 available (PurchasesOrchestrator.swift).isPurchaseAllowedByRestoreBehavior was called with StoreKit 1 selected..storeKit1, while the SDK's default is StoreKit 2 (StoreKitVersion.swift).Fix
Remove any .with(storeKitVersion: .storeKit1) from your configuration, or set .storeKit2.
StoreKit 2 mode needs an In-App Purchase key configured for the app. See invalidAppleSubscriptionKeyError.
Win-back offers need a recent OS (iOS 18 or later in the SDK source). On older systems the call is unavailable.
Hide the feature when the SDK runs StoreKit 1.
In your app
// 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
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.
In the SDK source, win-back offer eligibility and the restore-behavior check throw this error under StoreKit 1.
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
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