react-native-nag-lib
v1.0.1
Published
## Getting started
Downloads
6
Readme
react-native-nag-lib
Getting started
$ npm install react-native-nag-lib --save
Mostly automatic installation
$ react-native link react-native-nag-lib
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-nag-lib
and addRNNagLib.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNNagLib.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNNagLibPackage;
to the imports at the top of the file - Add
new RNNagLibPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-nag-lib' project(':react-native-nag-lib').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nag-lib/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-nag-lib')
Windows
- In Visual Studio add the
RNNagLib.sln
innode_modules/react-native-nag-lib/windows/RNNagLib.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Nag.Lib.RNNagLib;
to the usings at the top of the file - Add
new RNNagLibPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNNagLib from 'react-native-nag-lib';
// TODO: What to do with the module?
RNNagLib;