juggleim-rnsdk
v1.1.1
Published
React Native chat and instant messaging SDK for iOS and Android with TypeScript support
Maintainers
Readme
JuggleIM React Native SDK
English documentation | 简体中文文档
JuggleIM is a React Native chat and instant messaging SDK for iOS and Android. It provides TypeScript definitions and native support for private chat, group chat, chat rooms, rich media messages, read receipts, reactions, conversation management, voice/video calls, social moments, and AI streaming messages.
Features
- Private chat, group chat, chat rooms, and system conversations
- Text, image, file, voice, video, custom, merged, and streaming messages
- Message history, search, recall, deletion, reactions, and read receipts
- Unread counts, drafts, mute, pin, mentions, and conversation tags
- One-to-one and multi-party voice/video calls
- User/group profiles and social moments
- React Native 0.60+, Android 21+, iOS 9+, and TypeScript declarations
Installation
npm install juggleim-rnsdk --legacy-peer-depsAdd the JuggleIM Maven repository to Android:
allprojects {
repositories {
maven { url "https://repo.juggle.im/repository/maven-releases/" }
}
}For Android voice/video calls, also add:
maven { url "https://storage.zego.im/maven" }For iOS, run pod install from the ios directory after installing the npm package.
Quick start
import JuggleIM, { TextMessageContent } from 'juggleim-rnsdk';
JuggleIM.setServerUrls(['your_server_url']);
JuggleIM.init('your_app_key');
JuggleIM.connect('your_user_token');
JuggleIM.sendMessage(
{
conversationType: 1,
conversationId: 'recipient_user_id',
content: new TextMessageContent('Hello from React Native!')
},
{
onSuccess: message => console.log('Sent:', message),
onError: (message, errorCode) => console.error('Send failed:', errorCode)
}
);