Deprecation of this repo
As of version 5.1.15, published 5 March 2020, we are moving to https://github.com/uxcam/react-native-ux-cam for all future updates.
If you have issues, feature requests, pull requests etc. please put them in there.
Thanks! Richard @ UXCam
$yarn add file:/path-to-the-uxcam-react-wrapper
$react-native link react-native-ux-cam
For react-native version 0.60 if using iOS you then need to:
cd ios
Edit the Podfile
first line to be platform :ios, '10.0'
rather than platform :ios, '9.0'
then run the following to install the CocoaPods:
pod update && cd ..
import RNUxcam from 'react-native-ux-cam';
RNUxcam.optIntoSchematicRecordings(); // Add this line to enable iOS screen recordings
RNUxcam.startWithKey('YOUR API KEY');
yarn install
yarn add react-native-ux-cam
yarn add file:/path-to-uxcam-plugin
RNUxcam.startWithKey('YOUR UXCAM API KEY GOES HERE');
react-native run-android
cd iOS
Edit the Podfile
first line to be platform :ios, '10.0'
rather than platform :ios, '9.0'
then run the following to install the CocoaPods:
pod update && cd ..
react-native run-ios
# Yarn
yarn add react-native-ux-cam
# NPM
npm install --save 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
addinclude ':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.gradle
addcompile project(':react-native-ux-cam')
under dependencies -
Go to
android/app/src/main/java/com/terravion/dbug/MainApplication.java
addimport com.rnuxcam.rnuxcam.UXCamPackage;
-
Add the following to your file
android/app/build.gradle
(or add the maven url to your existing repositories section):
allprojects {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
maven { url "$rootDir/../node_modules/react-native/android" }
maven { url "http://sdk.uxcam.com/android/" }
}
- And add this to your file
android/app/src/main/AndroidManifest.xml
, inside your<application>
tag:
<service android:name="com.uxcam.service.HttpPostService"/>
// Import UXCam.
import UXCam from 'react-native-ux-cam';
// Add this line to enable iOS screen recordings
UXCam.optIntoSchematicRecordings();
// Initialize using your app key.
UXCam.startWithKey(key);
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!