I'm getting 'Lexical or Preprocessor' issues when I try and run on ios either in Xcode or command line. Android builds fine.
The first error is 'React/RCTBridgeModule.h' file not found. I can get rid of this by changing <React/RCTBridgeModule.h>
to "RCTBridgeModule.h"
but I just end up in an endless stream of the same issue with every module.
I don't believe this is a duplicate question. I've tried all solutions in similar questions and github issues but still can't get it to build;
- Unchecked Parallelize Build
- Ensured imports are using the updated format e.g.
#import <React/RCTBridgeModule.h>
- Removed
node_modules
,.xcworkspace
andpodfile.lock
and reinstalled/updated using bothnpm
andyarn
- Tried
react-native upgrade
- React and Pods project are listed above the project in Edit Scheme > Build
- Tried both Xcode 9 & 10 with both Legacy & New build systems
please check the image for paths
react-native info:
Environment:
OS: macOS High Sierra 10.13.6
Node: 8.11.1
Yarn: 1.12.3
npm: 6.5.0
Watchman: 4.9.0
Xcode: Xcode 10.1 Build version 10B61
Android Studio: 3.2 AI-181.5540.7.32.5056338
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.4 => 0.50.4