Hello everyone!
Everything works perfectly in Development build, but nothing related to Purchases SDK works during Production build.
Here’s a snippet of code which I’ll use as an example
async function checkPremium() {
try {
if (Platform.OS == "android") {
Purchases.configure({ apiKey: revenuecat.google });
} else {
Purchases.configure({ apiKey: revenuecat.apple });
}
const customerInfo = await Purchases.getCustomerInfo();
alert("customerInfo: ", customerInfo);
return typeof customerInfo.entitlements.active["premium"] !== "undefined";
} catch (err) {
alert(JSON.stringify(err))
return undefined;
}
}
Best answer by volzey
View original