# Yarn
yarn add react-native-ux-cam
# NPM
npm i react-native-ux-camFor iOS, you will need to pod update as well:
cd ios && pod update && cd ..
Starting from 5.3.0, we no longer support project with react native version <0.60.0. Use manual linking for older version to add UXCam to your project.
iOS 10 is the lowest version supported for recording sessions, which matches the default minimum version for new React Native projects.
import RNUxcam from 'react-native-ux-cam';
RNUxcam.optIntoVideoRecording(); // Add this line to enable screen recordings
const configuration = {
userAppKey: 'YOUR API KEY',
/*
disable advanced gestures if you're having issues with
swipe gestures and touches during app interaction
*/
// enableAdvancedGestureRecognition: false
}
RNUxcam.startWithConfiguration(configuration);A simple Javascript based example app is in the UXCamReactExample folder.
A very simple Typescript example is in the UXCamReactExample-Typescript folder.
For more detailed example using react-navigation, see UXCam-demo-chat-app
yarn install
yarn add react-native-ux-cam
yarn add file:/path-to-uxcam-plugin
const configuration = { userAppKey: 'YOUR API KEY', } RNUxcam.startWithConfiguration(configuration);
react-native run-android
To install the Cocoapod:
cd iOS && pod update && cd ..
Then to run the app:
react-native run-ios
# Yarn
yarn add react-native-ux-cam
# NPM
npm i react-native-ux-camAdd the following to your Podfile:
pod 'RNUxcam', :path => '../node_modules/react-native-ux-cam'and edit the minimum version of iOS to be >=10.0
Then run:
pod install-
Go to
android/settings.gradleaddinclude ':react-native-ux-cam'and on the following line addproject(':react-native-ux-cam').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ux-cam/android') -
Go to
android/app/build.gradleaddcompile project(':react-native-ux-cam')under dependencies. -
Go to
android/app/src/main/java/<path-to-main-application>/MainApplication.javaand addimport com.uxcam.RNUxcamPackage; -
Add
packages.add(new RNUxcamPackage());insidegetPackages()before return statement.
// Import UXCam.
import RNUxcam from 'react-native-ux-cam';
// Add this line to enable screen recordings
RNUxcam.optIntoVideoRecording();
// Initialize using your app key.
const configuration = {
userAppKey: 'YOUR API KEY',
/*
disable advanced gestures if you're having issues with
swipe gestures and touches during app interaction
*/
// enableAdvancedGestureRecognition: false
}
RNUxcam.startWithConfiguration(configuration);- Create a release branch from
developnamedrelease/v<version>, for examplerelease/v6.0.18. - Update Android SDK version on
uxcam-react-wrapper/android/build.gradle. - Update iOS SDK version on
uxcam-react-wrapper/RNUxcam.podspec. - Update plugin version on
uxcam-react-wrapper/package.json,uxcam-react-wrapper/android/src/main/java/com/uxcam/RNUxcamModuleImpl.javaanduxcam-react-wrapper/ios/RNUxcam/RNUxcam.mm. - Update
uxcam-react-wrapper/CHANGELOG.md. - Open a PR from
release/v<version>intomain; the release-readiness workflow validates npm, Git tag and GitHub Release availability. - Merge the PR into
main; the workflow automatically merges the release commit back intodevelop. - Tag the
mainmerge commit asv<version>and push the tag. - The tag workflow publishes to npm, creates the GitHub Release and notifies Slack.
- NB: If publishing a beta version then update the GitHub Action publish command to use the intended npm dist-tag.
This is an updated way of integrating the UXCam SDK react-native following on from the original work by Mark Miyashita (https://github.com/negativetwelve) without whom this would have all been much harder!