react-native-gainsight-px v1.5.2
React Native GainsightPX
- Release versions
- Installation React Native
- iOS
- Android
- Usage in React-Native import Configurations Initialisation Screen Event Custom Event Identify User Account
1.3.0
Editor Product Mapper preview.
Release Notes:
- Remove
isReady
inGainsightPX
bridge file.
- Remove
1.2.2
- Release Notes:
- Remove
isReady
inGainsightPX
bridge file.
- Remove
1.2.1
- Release Notes:
- Fix for tracking back button taps in iOS SDK.
1.2.0
- Release Notes:
- Introducing
Editor
to support preview engagements and map UI elements to features from mobile. - Scan QRCode from dashboard to preview engagements or create mapper feature.
- Deprecated
sharedInstance
. - Supporting
Bar
type dialog engagements. - Fix for video in engagement by changing window level.
- Fix for window access after completing engagement preview from editor.
- Fix to block all the events when user is in editing mode.
- Introducing
0.1.8
- Release Notes:
- Added proxy to Configurations
- Removed
recordScreenViews
from Configurations
Installation React Native
Download
react-native-gainsight-px-1.0.0.tgz
Add dependencies to you project
"dependencies": {
...,
...,
"react-native-gainsight-px": "file:/<path-to>/react-native-gainsight-px-1.0.0.tgz"
}
And
$ npm install
Or
In React-native project folder do
$ npm install <path-to-react-native-gainsight-px-1.0.0.tgz>
Installation iOS
Download
GainsightPX.framework
from url:<gainsight-framework-url>
In Xcode Make sure that you select
target
Add theframework
to theEmbedded Binaries
In terminal
$ cd <project-folder>
$ react-native run-ios
Installation Android
TODO:
Usage in React-Native
####Import
import { GainsightPX, Configurations, PXAccount, PXUser } from "react-native-gainsight-px";
####Configurations
TODO:
Initilisation
let c = new Configurations("<#API KEY#>");
c.enableLogs = true;
GainsightPX.getInstance().initialize(c);
Screen Event
Custom Screen
GainsightPX.getInstance().screenEvent("<#screen-name#>", "<#screen-class#>");
Only Screen Name
GainsightPX.getInstance().screen("<#screen-name#>", "<#map#>");
Custom Event
GainsightPX.getInstance().track("<#event-name#>", "<#map#>");
Internal
react-native-gainsight-px
publishing to Nexus
In package Root make sure you have
.npmrc
file
npm run release
local-linking
In package Root
npm run build
In Sample Application after npm install install the
react-native-gainsight-px-1.0.0.tgz
fileTo install this file
react-native-gainsight-px-1.0.0.tgz
$ cd RealSample
npm install ../react-native-gainsight-px-1.0.0.tgz
This command will add the path to the package.json in the Application
Getting started
Make sure you have
.npmrc
file
$ npm install react-native-gainsight-px --save
Mostly automatic installation
$ react-native link react-native-gainsight-px
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-gainsight-px
and addRNGainsightPx.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNGainsightPx.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNGainsightPxPackage;
to the imports at the top of the file - Add
new RNGainsightPxPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-gainsight-px' project(':react-native-gainsight-px').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gainsight-px/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-gainsight-px')
Usage
import RNGainsightPx from "react-native-gainsight-px";
// TODO: What to do with the module?
RNGainsightPx;
2 years ago