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

How to add native dependencies? #71

Open apertureless opened 6 years ago

apertureless commented 6 years ago

Hi I want to add some native ios package as a dependency. It should go into the Embedded Binaries section.

However if I open the lib created with react-native-create-library I can't see the General section where Embedded Binaries is in.

If I create a normal react native app react-native init and open the xcode projcet I see the general section.

jugutier commented 6 years ago

the library would be embedded into the app and not the other way around.

You can dismiss the xcworkspace that comes with react-native-create-library.

For your app just put my-library under dependencies in its package.json then run react-native link after that you should be able to run your code.

Otherwise you can refer to the guide here https://facebook.github.io/react-native/docs/native-modules-ios