Skip to main content
Solved

Missing syncAttributesAndOfferingsIfNeeded() in React Native


Forum|alt.badge.img

Hi, 

 

Looking at the documentation for custom attributes, I cannot find any information about syncing attributes and offerings using the React Native SDK. Does this mean that it is not required to sync attributes and offerings after setting an attribute or that it is not possible to sync attributes and offerings manually? 

We are trying to create a targeting rule based on custom attributes set during the onboarding. Curious to learn what the best practice is here.

 

Thanks in advance
Alexander

Best answer by Ryan Glanz

We don’t have a code snippet for that in our docs, but we do have some more info in our React Native docs: https://revenuecat.github.io/react-native-purchases-docs/8.0.0/classes/default.html#syncAttributesAndOfferingsIfNeeded

 

Tldr: it’s just the syncAttributesAndOfferingsIfNeeded method and it returns a promise.

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 370 replies
  • Answer
  • August 5, 2024

We don’t have a code snippet for that in our docs, but we do have some more info in our React Native docs: https://revenuecat.github.io/react-native-purchases-docs/8.0.0/classes/default.html#syncAttributesAndOfferingsIfNeeded

 

Tldr: it’s just the syncAttributesAndOfferingsIfNeeded method and it returns a promise.


Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • August 5, 2024
Ryan Glanz wrote:

We don’t have a code snippet for that in our docs, but we do have some more info in our React Native docs: https://revenuecat.github.io/react-native-purchases-docs/8.0.0/classes/default.html#syncAttributesAndOfferingsIfNeeded

 

Tldr: it’s just the syncAttributesAndOfferingsIfNeeded method and it returns a promise.

Thank you for the response. I did miss that this was added in the SDK version 7.24 which we haven’t updated to yet. Explaining why I could not find it. 


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