zsajjad/react-native-text-detector

'FirebaseCore/FirebaseCore.h' file not found ios

Closed this issue · 3 comments

I want to use the firebase version of the library, but I can't get to build the project, always get some errors.

I created my project with expo like: expo init myproject
Installed the firebase version of this module: npm install git+https://github.com/zsajjad/react-native-text-detector.git#firebase
Then ejecting it: expo eject
Changing the directory to ios and creating Podfile: pod init

Added these lines to the Podfile:
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'React', :path => '../node_modules/react-native'
pod 'RNTextDetector', path: '../node_modules/react-native-text-detector/ios'

Then updating and installing the pods with: pod update, pod install

Opening the myproject.xcworkspace file and adding GoogleService-Info.plist and finally tried to build it, but got this error:

RNTextDetector.m
#import <FirebaseCore/FirebaseCore.h> <= 'FirebaseCore/FirebaseCore.h' file not found

And I see some other errors as well, in the RNTextDetector > RCTBridgeModule.h:

typedef struct RCTMethodInfo { <= Redefinition of 'RCTMethodInfo'

What do I miss ?

@gmarcz @zsajjad
I also get this error and follow the same steps as mentioned in the issue. Please help me to resolve this. Thanks in advance.

Hi @anjanaNewput
I created a new fork https://github.com/gmarcz/react-native-text-detector and made some changes over there and updated the readme, so I will not repeat it here :)

Only one thing I left out there, first time when you build the app you may get some errors:

error: 
  node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc
  node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc
  node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc
  node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc

to fix these you need to execute these commands:

cd node_modules/react-native/scripts
./ios-install-third-party.sh
cd ../third-party/glog-0.3.5
../../scripts/ios-configure-glog.sh

I hope this helps.

@gmarcz you could have used firebase branch for this