Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<React/RCTDefines.h> file not found

I am Using cocoapods to install react native and react. I just want to use a toast component(https://www.npmjs.com/package/react-native-simple-toast) which does ti have a cocoapods Installation. when i install and and run the app I am getting an error "" file not found error. I have added header search path but still getting this error. 1)error enter image description here

2)react-native-simple-toast xcode project Header search path enter image description here

3) Main project Header search path enter image description here

like image 381
Anish Avatar asked Oct 13 '17 21:10

Anish


2 Answers

Try the following solution-

#if __has_include("RCTDefines.h")
  #import "RCTDefines.h"
#else
 #import <React/RCTDefines.h>
#endif

this works for me.

like image 70
Yogesh Shingare Avatar answered Nov 08 '22 22:11

Yogesh Shingare


Go to Project navigator > Libraries > RNFetchBlob.xcodeproj

Click on Build Settings and then the first item under "Targets"

Scroll down to 'Search Paths'

Double click to edit the 'Header Search Paths'

Add the following entry (click '+'): ${SRCROOT}/../../../ios/Pods/Headers.

Make sure to set it to recursive. (DOUBLE CLICK)

Clean (cmd + shift + K) and re-build (cmd + B)

https://github.com/joltup/rn-fetch-blob/issues/461#issuecomment-553355501

like image 3
Rahul Shakya Avatar answered Nov 08 '22 22:11

Rahul Shakya