Getting this error while building a react-native iOS app on xcode.
Started getting this error after npm install and rpm linking react-native-fs library. But
anhdevit's suggestion in https://github.com/facebook/react-native/issues/24363#issuecomment-488547280 worked for me:
In your terminal, run:
defaults delete com.apple.dt.Xcode
You just need to install pod, if pod file exists just type
pod install
if not: so first,
pod init
then,
pod install
in terminal. and you are good to go.
I ran into this issue after doing a manual react-native link
of a dependency which didn't support auto link on RN 0.59+
The solution was to select the xcodeproj file under the Libraries folder in Xcode and then in Build Settings, change Header Search Paths to add these two (recursive):
$(SRCROOT)/../../../ios/Pods/Headers/Public/React-Core
$(SRCROOT)/../../../ios/Pods/Headers/Public
For viewers who got this error after upgrading React Native to 0.40+, you may need to run react-native upgrade
on the command line.
After React Native 0.60 this issue is often caused by a linked library mixed with the new 'auto-linking' feature. This fixes it for me
Unlink old library using
$ react-native unlink react-native-fs
Refresh Pods integration entirely using
$ pod deintegrate && pod install
Now reload your workspace and do a clean build.
Latest releases of react-native libraries as explained in previous posts and here have breaking compatibility changes. If you do not plan to upgrade to react-native 0.40+ yet you can force install previous version of the library, for example with react-native-fs:
npm install --save -E react-native-fs@1.5.1