New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-chat-sdk

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-chat-sdk

An instant messaging SDK product is a software development kit that provides interfaces and functionalities for building and integrating real-time messaging features, enabling developers to implement instant messaging services within their applications.

latest
Source
npmnpm
Version
1.14.0
Version published
Weekly downloads
69
-59.88%
Maintainers
1
Weekly downloads
 
Created
Source

English | Chinese

Update time: 2024-12-19

Introduction to ChatSDK

An Instant Messaging SDK (Software Development Kit) is a collection of tools, libraries, and APIs designed to integrate real-time messaging capabilities into applications. It allows developers to easily add text, voice, and video communication features into mobile apps, websites, or other platforms without having to build the communication infrastructure from scratch.

Development environment requirements

  • MacOS 12 or higher
  • React-Native 0.66 or higher
  • NodeJs 16.18 or higher

For iOS app:

  • Xcode 13 or higher and its related dependency tool.

For the Android app:

  • Android Studio 2021 or higher and its related dependency tool.

Integrate ChatSDK

npm install react-native-chat-sdk
# or
yarn add react-native-chat-sdk

Quick start

  • Initialize SDK

    // Please use appkey or appId for initialization.
    const appKey = '<your app key>';
    const appId = '<your app ID>';
    ChatClient.getInstance()
      .init(
        appKey !== undefined
          ? ChatOptions.withAppKey({
              appKey: appKey,
              autoLogin: false,
            })
          : ChatOptions.withAppId({
              appId: appId,
              autoLogin: false,
            })
      )
      .then(() => {
        console.log('initialization success');
      })
      .catch((reason) => {
        console.error(reason);
      });
    
  • Connect to server

    // Connect to server
    const userId = '<your user ID>';
    const userToken = '<your user token>';
    ChatClient.getInstance()
      .loginWithToken(userId, userToken)
      .then((value) => {
        console.log(`login success`, value);
      })
      .catch((reason) => {
        console.error(reason);
      });
    
  • Send message

    // Send a message
    ChatClient.getInstance()
      .chatManager.sendMessage(message, {
        onError: (localMsgId: string, error: ChatError) => {
          console.error(error);
        },
        onSuccess: (message: ChatMessage) => {
          console.log(`send success`, message);
        },
      })
      .catch((reason) => {
        console.error(reason);
      });
    

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

react-native

FAQs

Package last updated on 05 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts