$ npm install react-native-thermal-state --save
$ react-native link react-native-thermal-state
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-thermal-state
and addRNThermalState.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNThermalState.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNThermalStatePackage;
to the imports at the top of the file - Add
new RNThermalStatePackage()
to the list returned by thegetPackages()
method
- Add
- Append the following lines to
android/settings.gradle
:include ':react-native-thermal-state' project(':react-native-thermal-state').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thermal-state/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-thermal-state')
- In Visual Studio add the
RNThermalState.sln
innode_modules/react-native-thermal-state/windows/RNThermalState.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app- Add
using Thermal.State.RNThermalState;
to the usings at the top of the file - Add
new RNThermalStatePackage()
to theList<IReactPackage>
returned by thePackages
method
- Add
import RNThermalState from 'react-native-thermal-state';
// TODO: What to do with the module?
RNThermalState;