Skip to main content
Answer

Missing syncAttributesAndOfferingsIfNeeded() in React Native

  • August 1, 2024
  • 2 replies
  • 137 views

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.

This post has been closed for comments

2 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 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
  • 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.

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.