Skip to main content
Solved

How to information from EntitlementInfo object in React Native

  • January 20, 2022
  • 1 reply
  • 112 views

Forum|alt.badge.img+3

Your documentation says we can access Expiration Date using EntitlementInfo but no code is given in how to call this object in React Native and I am having trouble to get this information.

-> https://docs.revenuecat.com/docs/purchaserinfo#section-get-entitlement-information 

Best answer by sundeep

Hi @Habydate,

You should be able to see two examples in our Subscription Status article for React Native: https://docs.revenuecat.com/docs/purchaserinfo#checking-if-a-user-is-subscribed 

In your example, you could access the expiration date like `purchaserInfo.entitlements.all.my_entitlement_identifier.expirationDate`

If you want to see the general structure of purchaserInfo and entitlementInfo for React Native, you can check out this file: https://github.com/RevenueCat/react-native-purchases/blob/main/src/purchaserInfo.ts#L34 

View original
Did this post help you find an answer to your question?

1 reply

sundeep
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 138 replies
  • Answer
  • February 7, 2022

Hi @Habydate,

You should be able to see two examples in our Subscription Status article for React Native: https://docs.revenuecat.com/docs/purchaserinfo#checking-if-a-user-is-subscribed 

In your example, you could access the expiration date like `purchaserInfo.entitlements.all.my_entitlement_identifier.expirationDate`

If you want to see the general structure of purchaserInfo and entitlementInfo for React Native, you can check out this file: https://github.com/RevenueCat/react-native-purchases/blob/main/src/purchaserInfo.ts#L34 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings