1.0.3 • Published 7 years ago
react-native-off-storage v1.0.3
react-native-off-storage
Getting started
$ npm install react-native-off-storage --save
Mostly automatic installation
$ react-native link react-native-off-storage
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-off-storageand addRNOffStorage.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNOffStorage.ato 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.thinkeasy.offStorage.RNOffStoragePackage;to the imports at the top of the file - Add
new RNOffStoragePackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-off-storage' project(':react-native-off-storage').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-off-storage/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-off-storage')
Windows
- In Visual Studio add the
RNOffStorage.slninnode_modules/react-native-off-storage/windows/RNOffStorage.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Off.Storage.RNOffStorage;to the usings at the top of the file - Add
new RNOffStoragePackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import RNOffStorage from 'react-native-off-storage';
// TODO: What to do with the module?
RNOffStorage;