5.6.2 • Published 7 months ago

@rongcloud/react-native-im-wrapper v5.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

rongcloud-react-native-im-wrapper npm version

融云 React Native IMLib 是以 IMLib SDK 5.2.5 版本为基础实现的开源项目,支持 Android、iOS,开发者在集成使用过程中如遇到问题可提交到 GitHub 的 Issues 中,融云技术支持人员会在 1 个工作日内回复问题,谢谢您对融云的理解与支持。

文档

用法

创建引擎

import { RCIMIWEngine, RCIMIWEngineOptions } from "@rongcloud/react-native-im-wrapper";
let appKey='your appkey'
let options : RCIMIWEngineOptions = {}
let engine = RCIMIWEngine.create(appKey, options);

连接融云服务

let token = 'your token'
let promise = engine.connect(token, 0)
promise.then(code => {
//
})

监听消息

engine.setOnMessageSentListener((code, message) => {
    
})

发送消息

let conversationType = RCIMIWConversationType.PRIVATE
let targetId = 'your targetId'
let channelId = ''
let text = 'Hello World'
let promise : Promise<RCIMIWTextMessage> = engine.createTextMessage(conversationType, targetId:, channelId, text):
promise.then(message =>{
  engine.sendMessage(message).then(code => {
    //
  })
})

更多示例请参考 examples

运行示例

yarn

# android
yarn example android

# ios
yarn example ios

项目结构

├── android (Android 接口实现)
├── docs (接口文档)
├── example (React Native 示例)
├── ios (iOS 接口实现)
└── src (接口实现)
5.6.2

7 months ago

5.2.5-release.1

1 year ago

5.2.5

2 years ago

5.2.4-release.3

2 years ago

5.2.4-release.2

2 years ago

5.2.4-release.1

2 years ago

5.2.4

2 years ago

5.2.3

2 years ago

5.2.3-release.1

2 years ago