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:
# npmnpm install react-native-tim-js# yarnyarn add react-native-tim-js# RN >= 0.60cd ios && pod install# RN < 0.60react-native link react-native-tim-js
Importing and initializing the SDK
import { TencentImSDKPlugin } from "react-native-tim-js";