Code
9
SDK error · code 9
What it means
missingReceiptFileError (code 9) means the StoreKit 1 code path found no App Store receipt on the device. It appears on restore or sync when the device has no purchase history yet, often in the sandbox, and when a promotional offer needs a receipt. The default StoreKit 2 mode does not need a receipt file. Make a purchase or sign in to a sandbox account, then restore again.
Code
9
iOS (Swift)
ErrorCode.missing
Android (Kotlin)
PurchasesErrorCode.Missing
Causes
Bundle.appStoreReceiptURL, and the file may not exist yet.Fix
Leave the SDK on its default StoreKit 2 mode unless you have a reason to force StoreKit 1. Then there is no receipt file to miss.
In the sandbox, make one sandbox purchase on the device before you test restore. A device with no purchase has nothing to restore.
Let the customer tap Restore purchases. On iOS this may ask them to sign in to their Apple account, which can refresh the receipt. See how to restore purchases.
For a new customer, show "No purchases found on this device" instead of an error.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .missingReceiptFileError {
// handle missing receipt file
}
// Kotlin
if (error.code == PurchasesErrorCode.MissingReceiptFileError) { /* ... */ } On RevenueDot: RevenueDot never sees this error, because the SDK raises it on the device before it sends a request. RevenueDot verifies StoreKit 2 signed transactions directly, and it needs the app's In-App Purchase key only for StoreKit 1 receipts.
FAQ
The StoreKit 1 path found no receipt on the device. That happens when the device has no purchase history, which is normal for a new sandbox account. Buy once on the account or use the default StoreKit 2 mode.
No. It means there is nothing to post yet. Treat it as an empty restore, and test again after a real or sandbox purchase.
In React Native, compare error.code with PURCHASES_ERROR_CODE.MISSING_RECEIPT_FILE_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.missingReceiptFileError.
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