'Error RevenueCat SDK evaluating RNPurchases.isConfigured

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.

It is always getting in the catch of those functions in the useEffect.

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.availablePackages[0].product])
        }
      } catch (e) {
        // put this on screen to version 18
        setError(e?.message + 'O meu errinho do bem')
      }
    }
    getPackages()
  }, [])

Thanks for any help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source