Question

Error trying to connect SDK in expo managed project evaluating RNPurchases.isConfigured

  • 13 May 2022
  • 1 reply
  • 33 views

Badge

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

1 reply

Badge

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

Reply