Code
36
SDK error · code 36
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.feature
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
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).Fix
Search your configuration for customEntitlementsComputation and remove it if you did not mean to use that mode.
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.
In a SwiftUI preview, the SDK blocks the call. Run the app on a simulator or device.
The SDK logs which call it refused. Turn on debug logs to see it.
In your app
// 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
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.
UI preview mode blocks the cache update the same way, so the SDK returns this error instead of calling the server.
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
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