Get unlimited public & private packages + team-based management with npm Teams.Learn more »

@survicate/react-native-survicate

1.0.0 • Public • Published

@survicate/react-native-survicate npm version

Requirements:

  • iOS at least on version 10.0
  • Android at least on version 4.4
  • React Native at least on version 0.59.10

Getting started

$ npm install @survicate/react-native-survicate --save

Mostly automatic installation

$ react-native link @survicate/react-native-survicate

Configuring Survicate Bindings for iOS

  • Add your Survicate workspace key to Info.plist
    <key>Survicate</key>
    <dict>
        <key>WorkspaceKey</key>
        <string>YOUR_WORKSPACE_KEY</string>
    </dict>
  • run command pod install in your ios directory

Configuring Survicate Bindings for Android

  • Add maven repository to your project build.gradle located under android directory
allprojects {
    repositories {
        // ...
        maven { url 'https://repo.survicate.com' }
    }
}
  • Add your Survicate workspace key to AndroidManifest.xml
<application
    android:name=".MyApp"
>
    <!-- ..-->
    <meta-data android:name="com.survicate.surveys.workspaceKey" android:value="YOUR_WORKSPACE_KEY"/>
</application>

Usage

import Survicate from '@survicate/react-native-survicate';
 
Survicate.initialize();
Survicate.invokeEvent("eventName");
Survicate.enterScreen("screenName");
Survicate.leaveScreen("screenName");
Survicate.setUserId("screenName");
Survicate.setUserTrait("traitName", "traitValue");
Survicate.reset();

Keywords

Install

npm i @survicate/react-native-survicate

DownloadsWeekly Downloads

6

Version

1.0.0

License

MIT

Unpacked Size

43.6 kB

Total Files

17

Last publish

Collaborators

  • avatar
  • avatar