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":[
{
"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":[ ],
"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([productId]); 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.active["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, [{ 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?