Menu

RevenueCat on Android: why the entitlement's productIdentifier never equals the package's
📰

RevenueCat on Android: why the entitlement's productIdentifier never equals the package's

DEV Community: reactnative·Mohamed Gado·about 7 hours ago
#d5oUhqRV
#devtoreactnative#devto#dev#plan#subscription
Long article (948 words) — no AI summary yet.
Reading 0:00
15s threshold

The paywall in Masareef , my expense tracker, marks the plan you already pay for. On Android it never did. Every monthly and yearly subscriber saw no current plan. Only the lifetime purchase matched.

There was no error. The code compared two strings that name the same subscription in different ways.

Two names for one subscription

A Google Play subscription is a product plus a base plan. RevenueCat reports the two halves in different shapes depending on where you read them:

Where Field Value

Entitlement productIdentifier pro_annual

Entitlement productPlanIdentifier annual

Package product.identifier pro_annual:annual

So this is false for every subscription on Android:

entitlement . productIdentifier === pkg . product . identifier ;

Enter fullscreen mode

Exit fullscreen mode

A one-time purchase has no base plan on either side, which is why lifetime was the only one that worked.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.