README
react-native-background-test-react
Getting started
$ npm install react-native-background-test-react --save
Mostly automatic installation
$ react-native link react-native-background-test-react
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-background-test-react
and addRNBackgroundTestReact.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNBackgroundTestReact.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.RNBackgroundTestReactPackage;
to the imports at the top of the file - Add
new RNBackgroundTestReactPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-background-test-react' project(':react-native-background-test-react').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-test-react/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-background-test-react')
Windows
- In Visual Studio add the
RNBackgroundTestReact.sln
innode_modules/react-native-background-test-react/windows/RNBackgroundTestReact.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Background.Test.React.RNBackgroundTestReact;
to the usings at the top of the file - Add
new RNBackgroundTestReactPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNBackgroundTestReact from 'react-native-background-test-react';
// TODO: What to do with the module?
RNBackgroundTestReact;