Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'React/RCTViewManager.h' file not found

Here I'm using xcodebuild shell command to build a release version in my react native project, it comes a fatal error:

'React/RCTViewManager.h' file not found

#import <React/RCTViewManager.h>

Xcode version: 8.3
react native version: 0.44.0

Any help ?

like image 386
Ci Kai Avatar asked Sep 06 '17 05:09

Ci Kai


1 Answers

This solved the problem for me

  1. Clear node_module folder and package-lock.json rm -rf node_modules && rm package-lock.json

  2. Clean Xcode's Build folder menu product>clean build folder

  3. Reinstall dependencies and link npm install && react-native link

  4. replace the #import <React/RCTViewManager.h> by #import "RCTViewManager.h"

Hope it helps you

like image 106
itishermann Avatar answered Nov 07 '22 13:11

itishermann