SDK: @revenuecat/purchases-capacitor@11.3.2
Description:
The TypeScript types for Purchases.getOfferings() indicate it returns PurchasesOfferings directly, but
at runtime it actually returns { offerings: PurchasesOfferings }.
Expected (per TypeScript types):
const offerings: PurchasesOfferings = await Purchases.getOfferings();
console.log(offerings.current); // Should work
Actual runtime behavior:
const result = await Purchases.getOfferings();
// result is actually { offerings: PurchasesOfferings }
// so result.current is undefined
// must access result.offerings.current
Workaround:
const result = await Purchases.getOfferings();
const offerings = ('offerings' in result)
? (result as any).offerings as PurchasesOfferings
: result;
Impact:
This causes offerings.current and offerings.all to be undefined when following the TypeScript types,
resulting in empty package lists and broken subscription flows.
Environment:
- @revenuecat/purchases-capacitor: 11.3.2
SDK: @revenuecat/purchases-capacitor@11.3.2
Description:
The TypeScript types for Purchases.getOfferings() indicate it returns PurchasesOfferings directly, but
at runtime it actually returns { offerings: PurchasesOfferings }.
Expected (per TypeScript types):
const offerings: PurchasesOfferings = await Purchases.getOfferings();
console.log(offerings.current); // Should work
Actual runtime behavior:
const result = await Purchases.getOfferings();
// result is actually { offerings: PurchasesOfferings }
// so result.current is undefined
// must access result.offerings.current
Workaround:
const result = await Purchases.getOfferings();
const offerings = ('offerings' in result)
? (result as any).offerings as PurchasesOfferings
: result;
Impact:
This causes offerings.current and offerings.all to be undefined when following the TypeScript types,
resulting in empty package lists and broken subscription flows.
Environment: