Skip to main content
The official React Native SDK for integrating g-tateth chat into iOS and Android apps.

Overview

With the React Native SDK, clients can:
  • Initialize a chat session from mobile
  • Send and receive messages in real time
  • Render a native React Native chat UI
  • Customize chat widget behavior directly in-app

Installation

npm install gtateth-react-native-sdk axios socket.io-client @react-native-async-storage/async-storage uuid

Quick Integration

import React from "react";
import { SafeAreaView } from "react-native";
import { GtatethChatWidget } from "gtateth-react-native-sdk";

export function SupportScreen() {
  return (
    <SafeAreaView style={{ flex: 1 }}>
      <GtatethChatWidget
        config={{
          baseUrl: "https://api.g-tateth.com",
          tenantDomain: "your-tenant-domain.com"
        }}
        customer={{
          firstName: "Jane",
          lastName: "Doe",
          email: "jane@example.com"
        }}
        allowInAppCustomization
      />
    </SafeAreaView>
  );
}

In-app Customization

Enable runtime settings editing:
<GtatethChatWidget
  config={{
    baseUrl: "https://api.g-tateth.com",
    tenantDomain: "your-tenant-domain.com"
  }}
  allowInAppCustomization
  persistInAppCustomization
/>
When enabled, tenants can edit:
  • Appearance: header/background/bubble colors
  • Behavior: title, empty state, input hint, indicators, offline message, message width
  • Chatbot: chatbot toggle, greeting message, chatbot online status

Behavior Parity with Web

  • Greeting priority: chatbot.greetingMessage then behavior.greetingMessage
  • behavior.showTypingIndicator controls typing emit behavior
  • availability.showAvailabilityStatus controls connection indicator visibility
  • chatbot.advanced.chatbotShowsOnline can keep status online while chatbot is active

Persistence Behavior

  • In-app customizations are persisted locally by default
  • Saved settings are restored after app refresh/restart
  • Load priority: local defaults -> tenant settings -> persisted in-app customization

Troubleshooting

  • Tenant not found
    • Verify tenantDomain or tenantId.
  • Network request failed
    • Confirm baseUrl is reachable from device/emulator.
  • No bot response
    • Check tenant chatbot settings and backend logs.