I think I’m doing something silly, but I cannot seem to get RevenueCat to show the correct eligibility for a subscription intro offer.
- If I bring up the RevenueCat Debug UI’s paywall, it shows the intro text properly mentioning you get 3 days in your trial.
- If I check with StoreKit 2, I get “true” for isEligibleForIntroOffer, as expected
- In RevenueCat, I get “unknown” for eligibility
Here’s my StoreKit 2 code that works:
let storeKitProducts = try! await Product.products(for: c"myproductid"])
let isEligibleForIntroOfferStoreKit = await storeKitProducts.first?.subscription?.isEligibleForIntroOffer
// Returns true
Here’s my RevenueCat code that seemingly doesn’t:
if let monthlyProduct {
let eligibility = await Purchases.shared.checkTrialOrIntroDiscountEligibility(product: monthlyProduct)
let isFreeTrialAvailable = eligibility == .eligible
print(isFreeTrialAvailable, eligibility)
Logger.log("Checked if free trial was available and determined \(isFreeTrialAvailable)")
// Returns false
}
I’m using a sandbox account on an iOS device if that helps/is relevant. I get this message in the console, but I’m not sure how that’s true when RevenueCat’s debug UI lists the sandbox receipt path and StoreKit 2 determines eligibility properly.
I would just change my logic from `eligibility == .eligible` to `eligibility != .ineligible` but that seems contrary to the advice here.
WARN: App running on sandbox without a receipt file. Unable to determine into eligibility unless you've purchased before and there is a receipt available.