flurry / react-native-flurry-sdk

React Native Flurry SDK
Apache License 2.0
45 stars 13 forks source link

null is not an object (evaluating 'ReactNativeFlurry.initBuilder') while using Expo #31

Closed cbanksbi closed 3 years ago

cbanksbi commented 3 years ago

Describe the bug Basically running into this bug when trying to init Flurry in my Expo project. Being that Expo's entry point is essentially App.js I call this method towards the bottom of my file before exporting. Can this package be used with Expo? I've been searching all over and haven't found instructions to use it in unison with it.

This Bug is About

Environment

To Reproduce

  1. Happens on build: expo start

App.js

// ...

import Flurry from 'react-native-flurry-sdk';

// ...

new Flurry.Builder()
  .withCrashReporting(true)
  .withLogEnabled(true)
  .withLogLevel(Flurry.LogLevel.DEBUG)
  .build('ANDROID_API_KEY', 'IOS_API_KEY');

export default () => (
  <Provider store={ store }>
     <PersistGate
       loading={ null }
       persistor={ persistor }
      >
      <AppContainer/>
    </PersistGate>
  </Provider>
);

Screenshots image

poting-oath commented 3 years ago

@cbanksbi Currently Expo is not supported by our Flurry plugin, and is not tested. We will look into this support.

If you have any suggestion and recommended fix, please also provide it so we can integrate with. Thanks!

robertpreoteasa commented 3 years ago

@cbanksbi did you manage to find a solution? We have the same issue on our app and did't find a fix yet.

poting-oath commented 3 years ago

@cbanksbi @robertpreoteasa Expo does NOT support or manage custom native libraries except their own build-in. I.e., Flurry plugin is a native library that invokes the native Android/iOS modules, and Expo does not support these kinds of native libraries.

You will need to "eject" Expo if you need to extend your apps to use the native libraries.

You can find more info here,