埋点 for React Native.
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).
rnpm install rnkit_sensor
$npm install -S rnkit_sensor
$react-native link rnkit_sensor
node_modules/rnkit_sensor/ios/RNKitExcard.xcodeproj
to your xcode project, usually under the Libraries
grouplibRNKitExcard.a
(from Products
under RNKitExcard.xcodeproj
) to build target's Linked Frameworks and Libraries
list$(PROJECT_DIR)/Frameworks.
rnpm install rnkit_sensor
$npm install -S rnkit_sensor
$react-native link rnkit_sensor
android/settings.gradle
:include ':rnkit_sensor'
project(':rnkit_sensor').projectDir = new File(rootProject.projectDir, '../node_modules/rnkit_sensor/android/app')
android/app/build.gradle
dependencies {
...
compile project(':rnkit_sensor')
}
import io.rnkit.excard.EXOCRPackage;
and register it in your MainActivity
(or equivalent, RN >= 0.32 MainApplication.java):@Override
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new EXOCRPackage()
);
}
ExBankCardSDK
And ExCardSDK
In Your Main Project.Finally, you're good to go, feel free to require rnkit_sensor
in your JS files.
Have fun! 🤘
Feel free to contact me or create an issue
made with ♥