I have troubles with the development of a React Native app.
I have developed a native module and a native ui component.
Finally, I would like to publish both as a NPM module.
However, when I tried to integrate the native module and the native ui as NPM package into a (new) React Native app (for example created with react-native init
command), I first got the following error Invariant Violation requireNativeComponent ComponentName was not found in UIManager
. According to some GitHub issues this might be a problem with missing linking.
So I decided to run react-native link
. However, by doing this the situation got even worse, because from that point on I got the following error Workspace Integrity Error - Couldn't load project
for all the RCT libraries.
I already followed the instructions of other Stackoverflow posts regarding that topic, which describe how to investigate the .pbxproj
file. Further, I tried to reinstall the pods of my npm package. Finally, I ensured that I use the .xcworkspace
file and not the .xcodeproj
file.
However, the errors still persist.
Worked for me by