INNER CODE UNIT · TypeScript
isValidPurchaserInfo
Flaque/quirk · src/payments/index.ts:16
const isValidPurchaserInfo = (info: PurchaserInfo) => {
if (info.activeEntitlements === "undefined") {
return false;
}
return info.activeEntitlements.some(ent => ALL_ENTITLEMENTS.includes(ent));
};
// Should be called once, likely on componentDidMount
export const setupRevenutCat = async () => {
Purchases.setDebugLogsEnabled(!!__DEV__);
Purchases.setup(REVENUECAT_API_KEY);
if (Platform.OS === "ios") {
Purchases.automaticAppleSearchAdsAttributionCollection = true;
}
};