react-native-ux-cam
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "react-native-ux-cam", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "React Native wrapper for uxcam.com.", | ||
@@ -26,4 +26,4 @@ "main": "./src/UXCam.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/negativetwelve/react-native-ux-cam.git" | ||
"url": "git+https://github.com/negativetwelve/react-native-ux-cam.git", | ||
"type": "git" | ||
}, | ||
@@ -34,6 +34,11 @@ "bugs": { | ||
"homepage": "https://github.com/negativetwelve/react-native-ux-cam", | ||
"engines": { | ||
"engines": {}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"babel-eslint": "7.0.0", | ||
"eslint": "3.8.1" | ||
}, | ||
"dependencies": { | ||
"scripts": { | ||
"lint": "eslint ." | ||
} | ||
} |
# react-native-ux-cam | ||
React Native wrapper for [UXCam](https://uxcam.com) | ||
React Native wrapper for [UXCam](https://uxcam.com). | ||
## Setup | ||
``` | ||
```bash | ||
# Yarn | ||
@@ -13,1 +13,49 @@ yarn add react-native-ux-cam | ||
npm install --save react-native-ux-cam | ||
``` | ||
### iOS with react-native and Cocoapods | ||
Run the following: | ||
```bash | ||
react-native link react-native-ux-cam | ||
``` | ||
Then, add the following to your Podfile: | ||
```ruby | ||
pod "UXCam", "~> 2.5.7" | ||
``` | ||
Then run: | ||
```bash | ||
pod install | ||
``` | ||
You're done! :tada: | ||
### Android | ||
Coming soon! | ||
## Usage | ||
```js | ||
// Import UXCam. | ||
import UXCam from 'react-native-ux-cam'; | ||
// Initialize using your app key. | ||
UXCam.startWithKey(key); | ||
// Tag a screen. | ||
UXCam.tagScreenName('my screen'); | ||
// Tag a user. | ||
UXCam.tagUserName('John Doe'); | ||
// Stop recording and upload data manually. | ||
UXCam.stopApplicationAndUploadData(); | ||
``` | ||
If a method is missing from the official SDK, please send a PR! |
// Libraries | ||
import {NativeModules} from 'react-native'; | ||
// Native Modules | ||
const {RNUXCam} = NativeModules; | ||
export default NativeModules.RNUXCam; | ||
class UXCam { | ||
startWithKey(key) { | ||
return RNUXCam.startWithKey(key); | ||
} | ||
stopApplicationAndUploadData() { | ||
return RNUXCam.stopApplicationAndUploadData(); | ||
} | ||
tagScreenName(screenName) { | ||
return RNUXCam.tagScreenName(screenName); | ||
} | ||
tagUserName(userName) { | ||
// Native expects a string so we have to coerce any integers | ||
// to strings. | ||
return RNUXCam.tagUserName(userName.toString()); | ||
} | ||
} | ||
export default new UXCam(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
167678
21
61
2
2