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