Skip to main content

Hi,

We encounter a problem when integrating RevenueCat with promotional offers on iOS. We’re using the same App User ID on all device, but we get different results on iOS emulator, on an iPhone plugged on a Mac and on an iPhone with Testflight. We were able to integrate “Developer Determined Offer” on Android with no issues.

On the iOS emulator, when we use the RC function Purchases.getProducts, we correctly see the promotional offer full_access_fidelity in the returning JSON:

{
  "currencyCode":"USD",
  "discounts":i
   {
     "cycles":12,
     "identifier":"full_access_fidelity",
     "period":"P1M",
     "periodNumberOfUnits":1,
     "periodUnit":"MONTH",
     "price":2.9,
     "priceString":"2.90 $"
   }
  ],
  "identifier":"sfw_full",
  "introPrice":{
   "cycles":1,
   "period":"P1W",
   "periodNumberOfUnits":1,
   "periodUnit":"WEEK",
   "price":0,
   "priceString":"0.00 $"
  },
  "price":29,
  "priceString":"29.00 $",
  "productCategory":"SUBSCRIPTION",
  "productType":"NON_CONSUMABLE",
  "subscriptionPeriod":"P1M",
}

However, when we test the same code on an iPhone plugged in the computer, the discounts array is empty:

{
  "productType":"NON_CONSUMABLE",
  "discounts":U  ],
  "currencyCode":"USD",
  "productCategory":"SUBSCRIPTION",
  "subscriptionPeriod":"P1M",
  "price":29,
  "priceString":"$29.00",
  "introPrice":null,
  "identifier":"sfw_full"
}

The product get correctly fetched, but the promotional offer isn’t found. We do not have access to console logs on Testflight, but the result is the same: the product is found but the promotional offer isn’t applied.

Here’s the function we’re using in React Native:

const setupOfferPurchaseWithSubscriptionOption = async () => {
try {
const productId = Platform.OS === "ios" ? "sfw_full" : "full_access";
const products = await Purchases.getProducts(rproductId]); if (!products.length) {
console.warn(`No product '${productId}' found.`);
return;
} const fullAccessProduct = products/0];
console.log("Product fetched:", fullAccessProduct); console.log("Available subscription options:", fullAccessProduct.subscriptionOptions?.map(opt => opt.id)); const optId = Platform.OS === "ios" ? "full_access" : "full-access-fidelity";
const fidelityOption = fullAccessProduct.subscriptionOptions?.find(opt => opt.id.includes(optId)); if (!fidelityOption) {
console.warn("Option " + optId + " not found");
return;
} const purchaserInfo = await Purchases.purchaseSubscriptionOption(fidelityOption);
console.log("Purchase successful:", purchaserInfo); if (purchaserInfo.customerInfo.entitlements.activeo"full_access"]) {
console.log("User now has 'full_access'");
}
} catch (error) {
const errorMessage = typeof error === "string" ? error : error?.message || JSON.stringify(error);
Alert.alert("Error during purchase:", errorMessage, i{ text: "OK" }]);
console.error("Purchase error:", error);
}
};

Since the promotional offer get correctly applied on emulator, we can supposed the promotional offer is correctly configured in Apple Store Connect.

What can explain the missing discounts on some device?

Hi ​@soscuisine,

Are logged in in the same Apple ID account in both the simulator and Testflight? It looks like on one version you might be elegible for the promotion but not on the other one. I’d be great if you could use the exact same account everywhere. You can also check the eligibility like this.

 

Best,


Yes, we’re connected with the same Apple ID account on both the simulator and the iPhone used for the tests. We also tested with an Apple sandbox account. We’ve correctly configured the promotional offer in App Store Connect, and is shown on the interface and the emulator. However, when we test the eligibility on a iPhone device with checkTrialOrIntroductoryPriceEligibility, we get:

{
 description: 'Product does not have trial or introductory price.',
 status: 3
}

It seems that RevenueCat does not detect the promotional offer, even though it exists in Aplle Store Connect.


Hi ​@soscuisine,

Are you using a StoreKit configuration file when using it in the simulator?

It’s also worth noting that the environment from the simulator (sandbox) is not the same as the environment from Testflight (sandbox-production) which then makes sense that you can have different behaviors. Would you mind trying from a brand new fresh account in Testflight and make sure to meet the eligibility criteria and try if that works?

Best,


Hi Joan,

We were able to make it work by using a sandbox account from App Store Connect. It seems using a non-sandbox account to apply an offer on Testflight doesn’t work. We can subscribe, but without getting any promotional offer. It’s something that we didn’t know.

Thank you for your help.


Hi ​@soscuisine,

Thank you for sharing your answer! I’m sure this will be helpful for others.

 

Best,


Reply