This project is React Native Chat Demo, which is a Demo project developed by react-native-tim-js and community-related open source packages. It can help you quickly develop an instant messaging chat scenario application.
Signed up for a Tencent Cloud account and completed identity verification.
- Created a chat application as instructed in Creating and Upgrading an Application and recorded the SDKAppID.
The same Tencent Cloud account can create up to 300 instant messaging IM applications. If there are already 300 applications, you can deactivate and delete the unused applications before creating new ones . *After the application is deleted, all data and services corresponding to the SDKAppID cannot be recovered, please operate with caution. >
- Record the SDKAppID. You can view the status, business version, SDKAppID, label, creation time, and expiration time of the newly created application on the console overview page.
- Click the created application, click Auxiliary Tools>UserSig Generation & Verification in the left navigation bar, create a UserID and its corresponding UserSig, copy the signature information, and use it for subsequent logins.
Refer to React Naitve official document to build a local development environment.
1: Execute the following code in the project root directory to install the dependencies required for the project:
// yarn
yarn
// npm
npm install
// ios
cd ios
pod install
- Fill in the prepared
SDKAppID, UserSig
into theconfig.ts
file. - Execute the following command to run:
// yarn
yarn android
yarn ios
// npm
npm run android
npm run ios
-
How to integrate into existing projects?
src/TUIKit
containsTUIChat
and other related components, which can be copied directly to your project. At the same time, you also need to install the corresponding dependencies. For the corresponding dependencies, check thepackage.json
file. -
How to use it in Expo?
In
expo
, if the package you use contains Native code, you need to usedevelopment build
. For detailed information, please check its official document. -
How to solve the Android project error
Task:react-native-create-thumbnail:compileDebugJavaWithJavac FAILED
?Please refer to souvik-ghosh/react-native-create-thumbnail#87 (comment)
-
App crash occurs?
Please check whether permission is applied.
-
No response when clicking to take a photo?
To use the camera function, please use a real device for debugging.