Code
26
SDK error · code 26
What it means
productDiscountMissingIdentifierError (code 26) means an iOS product discount has no offer identifier, so the SDK cannot build a promotional offer for it. Introductory offers have no identifier, and only promotional offers do. Request a promotional offer only for discounts that carry an offerIdentifier, and make sure the offer exists in App Store Connect.
Code
26
iOS (Swift)
ErrorCode.product
Android (Kotlin)
No matching code in the Android SDK; see the causes below.
Causes
getPromotionalOffer(forProductDiscount:product:) was called with a discount whose offerIdentifier is nil (PurchasesOrchestrator.swift).SKProductDiscount or Product.SubscriptionOffer has none (ErrorCode.swift).Fix
Offer a promotional offer only for discounts in product.discounts that have a non-nil offerIdentifier.
eligiblePromotionalOffers(forProduct:) returns the offers the customer can use, so you never pass an unusable discount.
Confirm the promotional offer exists, has an identifier and is approved. See Apple's guide to implementing promotional offers.
If a real promotional offer shows no identifier, report it with the product ID, since the SDK treats it as a store quirk.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .productDiscountMissingIdentifierError {
// handle product discount missing identifier
} On RevenueDot: RevenueDot is not involved. The SDK raises this error on the device before it asks the server to sign anything.
FAQ
The ID of a promotional offer set up in App Store Connect. The SDK needs it to ask for a signed offer. Introductory offers have no such ID.
No. Introductory offers are applied by the store without a signature. The error only affects promotional offers.
In React Native, compare error.code with PURCHASES_ERROR_CODE.PRODUCT_DISCOUNT_MISSING_IDENTIFIER_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.productDiscountMissingIdentifierError.
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