npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@survicate/react-native-survicate

v4.3.0

Published

React Native bindings for Survicate Mobile SDK

Downloads

7,966

Readme

@survicate/react-native-survicate npm version

Integrate Survicate into your React Native application to collect user feedback seamlessly.

Requirements:

  • iOS at least on version 12.0
  • Android at least on version 5
  • React Native at least on version 0.60.0

Installation

This package can be installed using npm or yarn. If you're using Expo, follow the Expo-specific instructions.

Using npm

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

Using yarn

yarn add @survicate/react-native-survicate

Using expo

Please note that due to custom native code in this package "Expo Go" is not available.

To use @survicate/react-native-survicate in an Expo managed project use npm, yarn or expo-cli.

expo install @survicate/react-native-survicate

Configuration

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>

Configuring Survicate Bindings for Expo

  • Add config plugin to plugins array of your app.json or app.config.js
{
  "expo": {
    "plugins": [
      [
        "@survicate/react-native-survicate",
        {
          "workspaceKey": "YOUR_WORKSPACE_KEY"
        }
      ]
    ]
  }
}

Please note that every time you change the props or plugins, you'll need to rebuild the native app.

Usage

import Survicate, {UserTrait} from '@survicate/react-native-survicate';

Survicate.initializeSdk();
Survicate.invokeEvent("eventName");
Survicate.enterScreen("screenName");
Survicate.leaveScreen("screenName");
const userIdTrait = new UserTrait('user_id', 'id');
Survicate.setUserTrait(userIdTrait);
const textTrait = new UserTrait('name', 'John');
const numberTrait = new UserTrait('age', 25);
const booleanTrait = new UserTrait('isPremium', true);
const dateTrait = new UserTrait('lastLogin', new Date());
const timeIntervalTrait = new UserTrait('timeOfPurchase', new Date());
const listener: SurvicateEventListener = {
    onSurveyDisplayed(event: SurveyDisplayedEvent) {},
    onQuestionAnswered(event: QuestionAnsweredEvent) {},
    onSurveyClosed(event: SurveyClosedEvent) {},
    onSurveyCompleted(event: SurveyCompletedEvent) {},
}
const subscription = Survicate.addSurvicateEventListener(listener);
Survicate.reset();

Issues

Got an Issue?

To make things more streamlined, we’ve transitioned our issue reporting to our customer support platform. If you encounter any bugs or have feedback, please reach out to our customer support team. Your insights are invaluable to us, and we’re here to help ensure your experience is top-notch!

Contact us via Intercom in the application, or drop us an email at: [[email protected]]

Thank you for your support and understanding!

Changelog

The Survicate Mobile SDK change log can be found here