React-native-branch-deep-linking-attribution: Cannot read property STANDARD_EVENT_ADD_TO_CART

Created on 5 Sep 2018  路  8Comments  路  Source: BranchMetrics/react-native-branch-deep-linking-attribution

I am getting this getting when using import branch from 'react-native-branch' in the ios simulator but it works fine on the device.

How can I fix this? Thanks

Most helpful comment

@kelvinblade I'm also getting this error. Did you manage to find a fix?

All 8 comments

@kelvinblade I'm also getting this error. Did you manage to find a fix?

Having the same error, Anyone knows a solution?

+1

+1

I had my getPackages() function explicitly/manually set to the list of native packages, and following the tutorial, I had missed the same for react-native-branch. Doing this in MainApplication.java solved the error for me:
import io.branch.rnbranch.RNBranchPackage;

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(),

        // bugsnag
        BugsnagReactNative.getPackage(),

        // react-native-branch
        new RNBranchPackage()
      );
    }

Any updates on this? I am getting this error in ios simulator

+1

Have you tried ?

react-native link react-native-branch
pod install

Was this page helpful?
0 / 5 - 0 ratings