# Yarn
yarn add react-native-ux-cam
# NPM
npm i react-native-ux-cam
For 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.optIntoSchematicRecordings(); // Add this line to enable iOS 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-cam
Add 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.gradle
add include ':react-native-ux-cam'
and on the following line
add project(':react-native-ux-cam').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ux-cam/android')
Go to android/app/build.gradle
add compile project(':react-native-ux-cam')
under dependencies.
Go to android/app/src/main/java/<path-to-main-application>/MainApplication.java
and
add import com.uxcam.RNUxcamPackage;
Add packages.add(new RNUxcamPackage());
inside getPackages()
before return statement.
// Import UXCam.
import RNUxcam from 'react-native-ux-cam';
// Add this line to enable iOS screen recordings
RNUxcam.optIntoSchematicRecordings();
// 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);
android/libs/uxcam.jar
latest Android SDK jar file.RNUxcam.podspec
package.json
, android/src/main/java/com/uxcam/RNUxcamModule.java
and ios/RNUxcam.m
npm publish --dry-run
to validate changes.npm publish
to publish the plugin.npm publish --tag=beta
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!