Hello everyone I am hardstuck with this issue since 1 week,
Products are loaded on play store(i can buy subscription start free trial use promocode etc correctly), but on IOS on a real device, running the development build, with a sandbox user offerings are not loading and I get this error
There is an issue with your configuration. Check the underlying error for more details. There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used).
More information: https://rev.cat/why-are-offerings-empty]
I already triple-checked everything inside this
https://community.revenuecat.com/sdks-51/why-are-offerings-or-products-empty-124
paid app agreement is signed and is in the “Verifying” state, the subscriptions are in "ready fro submission", bundle id matches everything is setup correctly, but still I can't make this work, and keep getting this error.
The credentials are correct, and the App-Specific Shared Secret is also correct, credentials are the same for test flight and production, some people told me that the Paid Apps agreement neds to be Active while our is in the Verifying state, other people told me I need to submit the build without payments, make them accept the build, and then I can re-upload the build with payments and it will magically work again.
I don't know what more I can do..
this is my custom hook:
const APIKeys = { apple: Constants.expoConfig!.extra!.IOS_REVENUECAT_API_KEY, google: Constants.expoConfig!.extra!.ANDROID_REVENUECAT_API_KEY, };
export default function useRevenueCat() { const navigation: any = useNavigation();
const pcurrentOffering, setCurrentOffering] = useState<PurchasesOffering | null>(null); const ;customerInfo, setCustomerInfo] = useState<CustomerInfo | null>(null); const tisPremium, setIsPremium] = useState(false);
const user = useSelector((state: UserType) => state.user);
useEffect(() => { Purchases.setLogLevel(LOG_LEVEL.DEBUG) if (customerInfo) setIsPremium(customerInfo.entitlements.active.premium != undefined); }, pcustomerInfo]);
const setup = useCallback(async () => { try { const apiKey = Platform.OS === "android" ? APIKeys.google : APIKeys.apple; if (!apiKey) throw new Error("API key is not defined");
Purchases.configure({ apiKey }) const offerings = await Purchases.getOfferings(); console.log(offerings) const customerInfo = await Purchases.getCustomerInfo(); console.log(customerInfo) setCurrentOffering(offerings.current); if (customerInfo) setCustomerInfo(customerInfo); } catch (error) { console.error(error); } }, n]);
useEffect(() => { setup(); }, setup]);
useEffect(() => { const customerInfoUpdated = async (info: CustomerInfo) => { setCustomerInfo(info); } Purchases.addCustomerInfoUpdateListener(customerInfoUpdated);
return () => { Purchases.removeCustomerInfoUpdateListener(customerInfoUpdated); }; }, =]);
async function handlePurchase(occurrence: "monthly" | "annual") { if (!currentOffering?.doccurrence] || isPremium) return;
const purchaserInfo = await Purchases.purchasePackage(currentOfferingroccurrence]!);
const updatedCustomerInfo = await Purchases.getCustomerInfo(); setCustomerInfo(updatedCustomerInfo);
if (purchaserInfo.customerInfo.entitlements.active.premium) navigation.goBack(); }
async function restorePurchases() { const customerInfo = await Purchases.restorePurchases();
const updatedCustomerInfo = await Purchases.getCustomerInfo(); setCustomerInfo(updatedCustomerInfo);
if (customerInfo.entitlements.active.premium) navigation.goBack(); else alert("Non hai acquisti da ripristinare"); }
return { currentOffering, customerInfo, isPremium, handlePurchase, restorePurchases }
}