English | Chinese
Update time: 2022-08-11
Instant messaging connects people wherever they are and allows them to communicate with others in real time. The Agora Chat SDK enables you to embed real-time messaging in any app, on any device, anywhere.
├── CHANGELOG.md // Release notes document
├── CONTRIBUTING.md // Contributor documentation
├── LICENSE // License file
├── README.md // Project help documentation
├── android // react native SDK android platform folder
├── docs // docs folder
├── example // project built-in demo
├── ios // react native SDK ios platform folder
├── lib // react native SDK generates product folder
├── modules // react native SDK native source code folder
├── node_modules // react native depends folder, generated by `yarn` or `npm` command
├── package.json // react native project management file
├── scripts // react native script folder
├── src // react native source code folder
├── tsconfig.build.json // typescript language build configuration file
├── tsconfig.json // typescript language configuration file
└── yarn.lock // yarn project dependency version configuration file
The requirements are as follows:
- React Native 0.66.5 or above
- NodeJs 16 or above (Recommended 18 or above)
- Xcode 13 or above for iOS application
- Android Studio 2022 or above for Android application
Open the terminal and go to the existing project folder to add SDK dependencies:
yarn add react-native-chat-sdk
or
npm i --save react-native-chat-sdk
ChatClient.getInstance()
.init(
new ChatOptions({
appKey: '<your app key>',
})
)
.then(() => {
console.log('init success');
})
.catch((reason) => {
console.log('init fail:', reason);
});
ChatClient.getInstance()
.loginWithToken('<your account ID>', '<your token>')
.then((value: any) => {
console.log(`login success`, value);
})
.catch((reason: any) => {
console.log(`login fail:`, reason);
});
Please refer to the corresponding example or method description.
See the Quick Start documentation for details. Portal
For more examples, see here.Portal
See Contributor Guide for details. Portal.
See the changelog for details. Portal.
See version type description for details. Portal.
See developer instructions for details. Portal.
See the User Instructions Portal for details.
MIT
If you encounter problems, please refer to here. Portal.
Official website document address
Version compatibility verification. Portal
Made with create-react-native-library