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

react-native-kustomer

v0.0.2

Published

Kustomer.com integration for React Native on Android and iOS.

Downloads

17

Readme

react-native-kustomer

Kustomer.com integration for React Native.

Requirements

iOS

  • Xcode 8.0+
  • iOS 9.0+
  • CocoaPods or Carthage

Android

  • Android Min SDK Version 21 i.e.., Android 5.0 Lollipop

Installation

npm install react-native-kustomer --save
yarn add react-native-kustomer

The Kustomer SDK requires a valid API Key with role org.tracking. See Getting Started - Create an API Key

iOS

Kustomer SDK

CocoaPods

The preferred installation method is with CocoaPods. Add the following to your Podfile:

pod 'Kustomer', :git => 'https://github.com/kustomer/customer-ios.git', :tag => '0.1.11'
Carthage

For Carthage, add the following to your Cartfile:

github "kustomer/customer-ios" ~> 0.1.11

RNKustomerModule

  1. Drang an drop RNKustomerModule.xcodeproj to your workspace
  2. Link target to libRNKustomerModule.a library
Setup

In your project's UIApplicationDelegate:

#import <Kustomer/Kustomer.h>

static NSString *const kKustomerAPIKey = @"YOUR_API_KEY";

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [Kustomer initializeWithAPIKey:kKustomerAPIKey];
    return YES;
}

For more follow The Kustomer iOS SDK Installation Guide

Android

Gradle

Include the library in your app.gradle:

compile 'com.kustomer.kustomersdk:kustomersdk:0.1.2'

or if you're using `gradle v3 or higher

implementation 'com.kustomer.kustomersdk:kustomersdk:0.1.2'

Or through Maven

<dependency>
  <groupId>com.kustomer.kustomersdk</groupId>
  <artifactId>kustomersdk</artifactId>
  <version>0.1.2</version>
  <type>pom</type>
</dependency>

Setup

Include the library in your android/app/build.gradle

apply plugin: "com.android.application"
...
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:23.0.1"
    implementation "com.facebook.react:react-native:0.29.+"
    implementation 'com.kustomer.kustomersdk:kustomersdk:0.1.2' // <--- add this
    implementation project(":react-native-kustomer") // <--- add this
}

Include the library in your android/settings.gradle

include ':react-native-kustomer'
project(':react-native-kustomer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-kustomer/android')
  1. In your project's MainApplication Class:
import com.kustomer.kustomersdk.Kustomer; // <--- import
import lt.miror.kustomer.RNKustomerPackage; // <--- import

private static final String K_KUSTOMER_API_KEY = "YOUR_API_KEY"; // <--- add this


@Override
protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new RNKustomerPackage() // <--- add this line
    );
}

@Override
public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
    Kustomer.init(this, K_KUSTOMER_API_KEY); // <--- add this
}

Register Module (in MainActivity.java)

import lt.miror.kustomer.RNKustomerPackage; // <--- import

protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new RNKustomerPackage() // <--- add this line to yout MainActivity class
    );
}
Declaring Activities
  1. Add KUSSessionsActivity & KUSChatActivity into your AndroidManifest.xml
<activity android:name="com.kustomer.kustomersdk.Activities.KUSSessionsActivity"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:theme="@style/KUSAppTheme" />

<activity android:name="com.kustomer.kustomersdk.Activities.KUSChatActivity"
            android:configChanges="orientation|screenSize|keyboardHidden"
            android:theme="@style/KUSAppTheme" />

For more follow The Kustomer Android SDK Installation Guide

Usage

import KustomerModule from "react-native-kustomer";


// Convenience method that will present the chat interface.
KustomerModule.presentSupport();

// Convenience methods that will present a browser interface pointing to your KnowledgeBase.
KustomerModule.presentKnowledgeBase();

// Convenience method that will present a custom web page interface
KustomerModule.presentCustomWebPage("https://www.example.com");

// Resets the user session, clearing the user's access to any existing chats from the device.
KustomerModule.resetTracking();

// Securely identify a customer. Requires a valid JSON Web Token.
KustomerModule.identify("SECURE_ID_HASH");

// Track the current page on appearance
[Kustomer setCurrentPageName:@"Home"];