please select
  • UIKit
  • SDK
  • Server APIs
Chat/
SDK/
React Native/
SDK
  • Run Demo
  • SDK Integration
  • Initialization
  • Login and Logout
  • Message
    • Message Overview
    • Sending Message
    • Receiving Message
    • Historical Message
    • Forwarding Message
    • Modifying Message
    • Message Inserting
    • Deleting Message
    • Clearing Messages
    • Recalling Message
    • Online Message
    • Read Receipt
    • Querying Message
    • Group @ Message
    • Targeted Group Message
    • Notification Muting
    • Message Extension
  • Group
    • Overview
    • Group Management
    • Group Profile
    • Group Member Management
    • Group Member Profile
    • Custom Group Attribute
    • Community Management
  • User
    • User Profile
    • Friend Management
    • Friend List
    • Blocklist
  • Offline Push
    • Offline Push
  • Local Search
    • Searching for Message
    • Searching for Friend
    • Searching Group
    • Searching for Group Member
  • Signaling
    • Signaling Management
  • Changelog
  • Guideline for Beginners
  • Console Guide
    • Creating and Upgrading an Application
    • Basic Configuration
    • Feature Configuration
    • Account Management
    • Group Management
    • Webhook Configuration
  • Product Introduction
    • Message Management
      • One-to-One Message
      • Message Storage
      • Offline Push
      • Group Message
      • Message Formats
    • Account System
      • Login Authentication
      • Online Status Management
    • Group Related
      • Group System
      • Group Management
    • User Profile and Relationship Chain
      • Profile Management
      • Relationship Chain Management
  • Purchase Guide
    • Billing Overview
    • Pricing
  • Error Codes

SDK Integration

This document describes how to quickly integrate the Tencent Cloud IM SDK into your React Native project.

Environment Requirements

Platform
Version
React Native
2.2.0 or later
Android
Android Studio 3.5 or later; devices on Android 4.1 or later for applications
iOS
Xcode 11.0 or later. For testing with a real device, make sure that your project has a valid developer signature.

Integrating the IM SDK

You can directly integrate the IM SDK for React Native by using nmp.

Integration through npm

Enter the following command in the terminal window:
# npm
npm install react-native-tim-js

# yarn
yarn add react-native-tim-js


# RN >= 0.60
cd ios && pod install

# RN < 0.60
react-native link react-native-tim-js

Importing and initializing the SDK

import { TencentImSDKPlugin } from "react-native-tim-js";