React native RTCRootView.h not found

I am trying to use React native, and I get an error in xcode that says: "Lexical or preprocessor error" RTCRootView.h "not found." I checked, and this file is in the framework folder, and I also tried moving it to the project and still could not fix the error and successfully create it.

+8
objective-c xcode react-native
source share
4 answers

In the example directory, run npm install to install the dependencies. Then open swipeoutExample.xcodeproj and run.

response-native-swipeout # 15 .

edit (2015-10-12):

response-native-swipeout has been updated to use the latest interactive, including ./ios and ./android .

  • iOS: Open the xcode project in the ./ios directory and run it.
  • Android: run the simulator, then run react-native run-android in the project root directory. (note: swipeout is currently not compatible with Android, but soon).
+18
source share

Running npm install may work for some people, but it didn’t work for me.

What worked for me in Xcode> Product> Clean Xcode> Product> Clear

+1
source share

Sometimes this may be due to the absence of the node_modules folder in the project directory.

  • Move the node_modules folder to your project
  • run npm install in the project directory
0
source share

Just ran into the same error. In my case, it was due to an input error. I replaced RTCRootView.h with RCTRootView.h (RCT is an acronym for ReaCT).

0
source share

All Articles