Notoriously Punctual Manatee
    Have ideas to improve npm?Join in the discussion! »

    @survicate/react-native-survicate
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/survicate__react-native-survicate package

    1.0.4 • 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

    395

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    43.7 kB

    Total Files

    17

    Last publish

    Collaborators

    • avatar
    • avatar