@apsisone/react-native-apsis-one
v0.0.42
Published
React-native wrapper for ApsisOne SDK (Android/iOS)
Downloads
11
Keywords
Readme
react-native-apsis-one
Getting started
$ npm install @apsisone/react-native-apsis-one --save
Mostly automatic installation
iOS
$ npx pod-install ios
Android
$ react-native link @apsisone/react-native-apsis-one
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜@apsisone/react-native-apsis-one/ios
and addApsisOneRn.xcodeproj
- In XCode, in the project navigator, select your project. Add
libApsisOneRn.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.ApsisOneRnPackage;
to the imports at the top of the file - Add
new ApsisOneRnPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-apsis-one-rn' project(':react-native-apsis-one-rn').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-apsis-one-rn/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-apsis-one-rn')
Usage
import ApsisOneRn from '@apsisone/react-native-apsis-one';
// TODO: What to do with the module?
ApsisOneRn;
You can view examples of plugin usage in example folder
To use example project:
iOS
$ cd examples
$ npm install @apsisone/react-native-apsis-one
$ npx pod-install ios
$ xed -b ios