rnkit_sensor v1.0.10
埋点 for React Native.
Getting Started
First, cd to your RN project directory, and install RNMK through rnpm . If you don't have rnpm, you can install RNMK from npm with the command npm i -S rnkit_sensor and link it manually (see below).
iOS
React Native < 0.29 (Using rnpm)
rnpm install rnkit_sensorReact Native >= 0.29
$npm install -S rnkit_sensor$react-native link rnkit_sensor
Manually
- Add
node_modules/rnkit_sensor/ios/RNKitExcard.xcodeprojto your xcode project, usually under theLibrariesgroup - Add
libRNKitExcard.a(fromProductsunderRNKitExcard.xcodeproj) to build target'sLinked Frameworks and Librarieslist - Add ocr framework to
$(PROJECT_DIR)/Frameworks.
Android
React Native < 0.29 (Using rnpm)
rnpm install rnkit_sensorReact Native >= 0.29
$npm install -S rnkit_sensor$react-native link rnkit_sensor
Manually
- JDK 7+ is required
Add the following snippet to your
android/settings.gradle:include ':rnkit_sensor' project(':rnkit_sensor').projectDir = new File(rootProject.projectDir, '../node_modules/rnkit_sensor/android/app')Declare the dependency in your
android/app/build.gradledependencies { ... compile project(':rnkit_sensor') }Import
import io.rnkit.excard.EXOCRPackage;and register it in yourMainActivity(or equivalent, RN >= 0.32 MainApplication.java):@Override protected List<ReactPackage> getPackages() { return Arrays.asList( new MainReactPackage(), new EXOCRPackage() ); }Add Module
ExBankCardSDKAndExCardSDKIn Your Main Project.
Finally, you're good to go, feel free to require rnkit_sensor in your JS files.
Have fun! :metal:
Questions
Feel free to contact me or create an issue
made with ♥