1

This is a long shot, but I've taken over a project done in RN v .38 and I need to update a library and resolve the build issues without updating the version of react native. I'm trying to update the react-native-aws-cognito-js library and while it looks to be compatible with the formatting change of import statements, I'm still not able to get it to build on IOS. Android is fine.

To reproduce my issue I did the following:

react-native init sample --version 0.38.0
cd sample
npm install react-native-aws-cognito-js
react-native link react-native-aws-cognito-js
react-native run-ios

Which fails with:

/node_modules/react-native-aws-cognito-js/ios/RNAWSCognito.h:4:9: fatal error: 'React/RCTBridgeModule.h' file not found #import

Mobile and RN development is not my wheelhouse, but I'm hoping there is some sort of xcode configuration or tricks I can do to get this working and avoid a major overhaul. Running an upgrade to >.40 would probably take too long and also cause other compatibility issues that I don't have the time to resolve.

Note: I have tried the suggestions in `React/RCTBridgeModule.h` file not found

Ajeett
  • 814
  • 2
  • 7
  • 18
Brad P
  • 106
  • 5
  • when you do `npm install react-native-aws-cognito-js`, you are using the latest version of that lib => it might not work with your old react-native. So, go to `react-native-aws-cognito-js` official page and find out which version can run best with react-native@0.38 – Khoa Mar 16 '18 at 08:18
  • Yea. We verified that it is compatible. We realized that it is an issue with some pathing issues in the library. We ended up making a fork of the lib and adding a path to HEADER_SEARCH_PATHS in the project.pbxproj. We found we need to add `"$(SRCROOT)/../../react-native/React/**",` so it would see the instance of React. – Brad P Mar 19 '18 at 18:18

0 Answers0