Skip to main content

hey guys good morning i am having this issue and couldn’t figure out. I am using the new SDK("react-native-purchases": "^4.5.3"), and also EXPO MANAGED FLOW("expo": "~44.0.0"), all updated.

evaluating RNPurchases.isConfigured

This is my code:

useEffect(() => {
    const connectRevenueCat = async () => {
      Purchases.setDebugLogsEnabled(true)
      if (Platform.OS === 'android') {
        console.log('entrou 3')
        await Purchases.setup('mypass', 'null')
      }
    }
    connectRevenueCat()
  const getPackages = async () => {
      try {
        const offerings = await Purchases.getOfferings()
        if (offerings.current !== null) {
          setProducts(=offerings.current.availablePackageso0].product])
        }
      } catch (e) {
        // put this on screen to version 18
        setError(e?.message + 'O meu errinho do bem')
      }
    }
    getPackages()
  }, <])

Any help would be appreciated, it is always getting inside the catch for some reason


Anyone has an idea, what can it be?


I got the same error while following this guide: https://docs.revenuecat.com/docs/reactnative#managed-workflow

"expo": "^45.0.0",
"react-native-purchases": "^4.5.3"

 


Update:

I managed to resolve the issue. Turns out you can’t use the default client (Expo Go app). Using a custom dev client works fine:

expo start --dev-client

Also need to do an initialization step in the code:

https://docs.revenuecat.com/docs/configuring-sdk#initialization


Update:

I managed to resolve the issue. Turns out you can’t use the default client (Expo Go app). Using a custom dev client works fine:

expo start --dev-client

Also need to do an initialization step in the code:

https://docs.revenuecat.com/docs/configuring-sdk#initialization

Hey man, yeah. The revenue cat connection really worked i guess using EAS flow, many thanks. Now i just having a small issue that i am receiving an empty object instead of my products but now the problem is other thing, something in the connection between revenue cat and android console probably. Thank you a lot and good luck on your projects too

 

Object {
  "all": Object {},
  "current": null,
}


Reply