1.2.9 • Published 4 years ago
test-react-native-library-tiru v1.2.9
react-native-user-experior
Getting started
$ npm install test-react-native-library-tiru --save
Mostly automatic installation
For react-native version less than 0.60
react-native link test-react-native-library-tiru
For react-native version >=0.60, if using iOS you then need to:
Edit the Podfile minimum platform version to platform :ios, '10.0'
cd ios && pod update && cd ..
Manual installation
iOS
npm install test-react-native-library-tiru --save
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜test-react-native-library-tiru
and addRNUserExperior.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNUserExperior.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Click
RNUserExperior.xcodeproj
in the project navigator and go theBuild Settings
tab. Make sure 'All' is toggled on (instead of 'Basic'). Look forHeader Search Paths
and make sure it contains both$(SRCROOT)/../react-native/React
and$(SRCROOT)/../../React
- mark both asrecursive
. - Run your project (
Cmd+R
)
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNUserExperiorPackage;
to the imports at the top of the file - Add
new RNUserExperiorPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':test-react-native-library-tiru' project(':test-react-native-library-tiru').projectDir = new File(rootProject.projectDir, '../node_modules/test-react-native-library-tiru/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':test-react-native-library-tiru')
Usage
var UserExperior = require('test-react-native-library-tiru');
UserExperior.startRecording("key_here");
// TODO: What to do with the module?
RNUserExperior;