https://github.com/rnkit/rnkit_sensor
埋点
https://github.com/rnkit/rnkit_sensor
Last synced: 5 months ago
JSON representation
埋点
- Host: GitHub
- URL: https://github.com/rnkit/rnkit_sensor
- Owner: rnkit
- License: mit
- Created: 2017-08-17T02:59:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T09:26:46.000Z (almost 8 years ago)
- Last Synced: 2025-10-01T20:55:18.158Z (8 months ago)
- Language: Objective-C
- Size: 353 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm][npm-badge]][npm]
[![react-native][rn-badge]][rn]
[![MIT][license-badge]][license]
[![bitHound Score][bithound-badge]][bithound]
[](https://www.npmjs.com/package/rnkit_sensor)
埋点 for [React Native][rn].
[**Support me with a Follow**](https://github.com/simman/followers)
[npm-badge]: https://img.shields.io/npm/v/rnkit_sensor.svg
[npm]: https://www.npmjs.com/package/rnkit_sensor
[rn-badge]: https://img.shields.io/badge/react--native-v0.40-05A5D1.svg
[rn]: https://facebook.github.io/react-native
[license-badge]: https://img.shields.io/dub/l/vibe-d.svg
[license]: https://raw.githubusercontent.com/rnkit/rnkit_sensor/master/LICENSE
[bithound-badge]: https://www.bithound.io/github/rnkit/rnkit_sensor/badges/score.svg
[bithound]: https://www.bithound.io/github/rnkit/rnkit_sensor
## Getting Started
First, `cd` to your RN project directory, and install RNMK through [rnpm](https://github.com/rnpm/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_sensor`
* #### React Native >= 0.29
`$npm install -S rnkit_sensor`
`$react-native link rnkit_sensor`
#### Manually
1. Add `node_modules/rnkit_sensor/ios/RNKitExcard.xcodeproj` to your xcode project, usually under the `Libraries` group
1. Add `libRNKitExcard.a` (from `Products` under `RNKitExcard.xcodeproj`) to build target's `Linked Frameworks and Libraries` list
1. Add ocr framework to `$(PROJECT_DIR)/Frameworks.`
### Android
* #### React Native < 0.29 (Using rnpm)
`rnpm install rnkit_sensor`
* #### React Native >= 0.29
`$npm install -S rnkit_sensor`
`$react-native link rnkit_sensor`
#### Manually
1. JDK 7+ is required
1. Add the following snippet to your `android/settings.gradle`:
```gradle
include ':rnkit_sensor'
project(':rnkit_sensor').projectDir = new File(rootProject.projectDir, '../node_modules/rnkit_sensor/android/app')
```
1. Declare the dependency in your `android/app/build.gradle`
```gradle
dependencies {
...
compile project(':rnkit_sensor')
}
```
1. Import `import io.rnkit.excard.EXOCRPackage;` and register it in your `MainActivity` (or equivalent, RN >= 0.32 MainApplication.java):
```java
@Override
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new EXOCRPackage()
);
}
```
1. Add Module `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! :metal:
## Questions
Feel free to [contact me](mailto:liwei0990@gmail.com) or [create an issue](https://github.com/rnkit/rnkit_sensor/issues/new)
> made with ♥