react-native-jwt-universal
v1.0.9
Published
## Getting started
Downloads
5
Readme
react-native-jwt-universal
Getting started
$ npm install react-native-jwt-universal --save
Mostly automatic installation
$ react-native link react-native-jwt-universal
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-jwt-universal
and addRNJwtUniversal.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNJwtUniversal.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.RNJwtUniversalPackage;
to the imports at the top of the file - Add
new RNJwtUniversalPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-jwt-universal' project(':react-native-jwt-universal').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-jwt-universal/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-jwt-universal')
Windows
- In Visual Studio add the
RNJwtUniversal.sln
innode_modules/react-native-jwt-universal/windows/RNJwtUniversal.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Jwt.Universal.RNJwtUniversal;
to the usings at the top of the file - Add
new RNJwtUniversalPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNJwtUniversal from 'react-native-jwt-universal';
// TODO: What to do with the module?
RNJwtUniversal;