frostney / react-native-create-library

:notebook: Command line tool to create a React Native library with a single command
MIT License
1.45k stars 113 forks source link

'React/RCTBridgeModule.h' file not found #46

Closed malekhassani closed 6 years ago

malekhassani commented 6 years ago

hey guys, I try to create a React Native library with "react-native-create-library". But when I open my iOS library I can't import the RCTBridgeModule.h. thanks for your answers.

viniciuspalma commented 6 years ago

I have the same problem, I think React must be a dependency of the lib.

viniciuspalma commented 6 years ago

I found the PR that fixes this problem, #44

@malekhassani We must update the library and run again, or just make the same changes that have on this PR ;)

malekhassani commented 6 years ago

thank you @viniciuspalma, I solved the problem by adding the React.xcodeproj to my lib

ademcan commented 6 years ago

I have the same issue with the master branch, although this should have been fixed with the mentioned PR. I just create a new FancyLibrary, cd to the folder, run npm install and open the ios/xworkspace but I have the same issue mentioned in here. Did you guys managed to solve it? I am using Xcode 10 on High Sierra. Thank you

maicki commented 5 years ago

It's not possible to build the library within the Xcode project. You should link it into a project and develop within there.

ademcan commented 5 years ago

Ok, I see, it makes sense. I indeed managed to use it into a project, but thought as a first step to build it alone... thank you for your help @maicki

eshiett1995 commented 4 years ago

It's not possible to build the library within the Xcode project. You should link it into a project and develop within there.

  1. What do you mean by it is not possible to build the library within the xcode project ?
  2. How do you link it into a project and develop it there ? because following this article, everything was done within the xcode project
eshiett1995 commented 4 years ago

44

@viniciuspalma How am I going to update the library, I am a bit confused. is it like this:

  1. npm install -g react-native-create-library

2.react-native-create-library -—platforms ios,android NativeToastLibrary

  1. cd NativeToastLibrary

  2. npm install

because I tried the above step and React/RCTBridgeModule.h' file is still not found