React Native Config.h not found

I will add another answer to this issue since it was driving me crazy this week...

$ cd ./node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd $(ls | grep 'glog' | awk '{print $1}') && ./configure

The steps needed to manually configure glog (like samridhgupta his accepted answer or the command I wrote here just above) worked for me, but only the first time I build the project. On every single build I had to go to the same process so I needed a more stable solution.

I appears Xcode is executing ios-install-third-party.sh on every build, which means it will also execute ios-configure-glog.sh every single time. So my solution is to just build a single time, and then comment out the glog install step in the ios-install-third-party script.

If anyone is facing this same issue, it is the line below you need to remove or comment out (ios-install-third-party can be found in /node_modules/react-native/scripts).

fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""

I got it fixed by following this steps:

  1. Close Xcode.
  2. cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
  3. Run ./configure
  4. Run make
  5. Run make install
  6. Open Xcode and try building the Project.

Hope this solves the issue


Solution:

yarn upgrade log

Upgrade to v1.6.0 successful. iOS build successful.

Note: Rebuilding glog did did not work for me. Build failed.