No description, website, or topics provided.
Clone or download
debris Merge pull request #3 from fckt/master
Fix RN 0.47 support on Android
Latest commit eacdd44 Jun 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android fix RN 0.47 support on Android Jun 6, 2018
example initial commit Feb 27, 2017
ios fix Error: Redefinition of RCTMethodInfo Apr 20, 2018
.gitattributes initial commit Feb 27, 2017
.gitignore initial commit Feb 27, 2017
README.md initial commit Feb 27, 2017
index.js initial commit Feb 27, 2017
package.json dongrade react-native peer dependency to 0.40 Feb 27, 2017

README.md

react-native-secure-storage

Getting started

$ npm install react-native-secure-storage --save

Mostly automatic installation

$ react-native link react-native-secure-storage

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-secure-storage and add RNSecureStorage.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNSecureStorage.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNSecureStoragePackage; to the imports at the top of the file
  • Add new RNSecureStoragePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-secure-storage'
    project(':react-native-secure-storage').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-secure-storage/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-secure-storage')
    

Windows

Read it! :D

  1. In Visual Studio add the RNSecureStorage.sln in node_modules/react-native-secure-storage/windows/RNSecureStorage.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Com.Reactlibrary.RNSecureStorage; to the usings at the top of the file
  • Add new RNSecureStoragePackage() to the List<IReactPackage> returned by the Packages method

Usage

import RNSecureStorage from 'react-native-secure-storage';

// TODO: What to do with the module?
RNSecureStorage;