Linking native library with react native?

1) What does this mean when it comes to native library? Which library? will they be used as graddle dependencies?

2) How to tie them? I ran into a problem when using link

or rnpm

.

+3


source to share


1 answer


Linking a native library means that you are going to integrate an already implemented module into your application, or a module that completes your own functions of a native module, for example: if you prepare a video player board with all controls to play music you have to integrate interactive video (third party ) because there is no built-in lib library. in the reaction of my own. After integrating the video lib, you can play.

Lib integration steps (android):

1) Add package name to new packages () 2) Add dependencies on settings.gradle file and main gradle application ie app / gradle. 3) sync gradle projects because you made changes in gradle and done.



After cloning / loading the project:

1) Go to your project home directory using cmd. 2) run npm install

3) After that run rnpm link or react-native link

4) see ios folder in your project folder and if you find a pod file, run pod install

after going to ios folder in cmd.

Cheers :)

+2


source







All Articles