SDK error · code 36

featureNotAvailableInCustomEntitlementsComputationMode (error code 36): Not available in custom entitlements mode

What it means

featureNotAvailableInCustomEntitlementsComputationMode (code 36) means you called a feature that the SDK turns off in its customEntitlementsComputation mode, or in UI preview mode. Turn the dangerous setting off if you want the full SDK, or call only the features that mode supports. Normal apps never see it, because the setting is off by default.

Code

36

iOS (Swift)

ErrorCode.featureNotAvailableInCustomEntitlementsComputationMode

Android (Kotlin)

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

Causes

Why the SDK returns featureNotAvailableInCustomEntitlementsComputationMode

  • The SDK was configured with the customEntitlementsComputation dangerous setting (or built for that mode), and a call such as updating all caches, or the combined attributes-and-offerings sync, was made. Both return this error (Purchases.swift).
  • UI preview mode, which the SDK uses for SwiftUI previews, blocks the same cache update.
  • Android has no member for this code (PurchasesErrorCode.kt).

Fix

How to fix featureNotAvailableInCustomEntitlementsComputationMode

  1. 01

    Check the dangerous settings

    Search your configuration for customEntitlementsComputation and remove it if you did not mean to use that mode.

  2. 02

    Call only supported features

    If you do use the mode, the SDK computes entitlements in your app, so features that need the server's entitlement logic are off. Use the calls the mode documents.

  3. 03

    Test outside preview mode

    In a SwiftUI preview, the SDK blocks the call. Run the app on a simulator or device.

  4. 04

    Read the log

    The SDK logs which call it refused. Turn on debug logs to see it.

In your app

How to handle it in code

  • Do not retry. The call stays blocked in that mode.
  • Do not show this to customers. It is a build or configuration issue.
  • 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 == .featureNotAvailableInCustomEntitlementsComputationMode {
  // handle not available in custom entitlements mode
}

FAQ

featureNotAvailableInCustomEntitlementsComputationMode: questions people ask

What is customEntitlementsComputation?

A dangerous setting in the iOS SDK that turns off the SDK's own entitlement handling, for apps that compute entitlements themselves. Several calls then return this error.

Why do I see this error in a SwiftUI preview?

UI preview mode blocks the cache update the same way, so the SDK returns this error instead of calling the server.

How do I check for featureNotAvailableInCustomEntitlementsComputationMode 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 "36". In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.featureNotAvailableInCustomEntitlementsComputationMode.

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