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