npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@byron-react-native/tim-js

v0.1.3

Published

Tencent IM SDK for react native

Readme

Tencent IM SDK for React native

腾讯云官方IM React Native SDK, 可轻松集成聊天、会话、群组、资料管理能力,帮助您实现文字、图片、短语音、短视频等富媒体消息收发,全面满足通信需要。

安装

NPM

npm install react-native-tim-js

Yarn

yarn add react-native-tim-js

使用方法

前提条件

  1. 您已 注册腾讯云 帐号,并完成 实名认证
  2. 参照 创建并升级应用 创建应用,并记录好SDKAppID

如何使用

import { TencentImSDKPlugin } from 'react-native-tim-js';

// 获取IM实例
const timManger = TencentImSDKPlugin.v2TIMManager;

// 群组高级接口,包含了群组的高级功能,例如群成员邀请、非群成员申请进群等操作接口。
const groupManager = timManager.getGroupManager();

// 高级消息接口, 包含了创建消息,发送消息,获取历史消息等接口
const messageManager = timManager.getMessageManager();

// 关系链接口,包含了好友的添加和删除,黑名单的添加和删除等逻辑。
const friendshipManager = timManager.getFriendshipManager();

// 会话接口,包含了会话的获取,删除和更新的逻辑。
const conversationManager = timManager.getConversationManager();

// 离线推送接口
const offlinePushManager = timManager.getOfflinePushManager(); 

// 信令接口,包含
const signalingManager = timManager.getSignalingManager();

// 初始化SDK
const sdkAppID = 0; // 前提条件第二部申请的sdkAppID
const logLevel = LogLevelEnum.V2TIM_LOG_DEBUG;
await timManger.initSDK(sdkAppID, logLeve);

// 登录
const userID = 123456; // 用户登录ID
const userSig = "xxx"; // userSig 生成请参考 [UserSig 后台 API](https://cloud.tencent.com/document/product/269/32688)
timManger.login(userID, userSig);

// 发送第一条消息
const friendID = 456789; // 接收消息用户ID
const text = "Hello, Tencent IM";
timManger.sendC2CTextMessage(friendID, text);

// 登出
timManager.logout();

更多接口使用请参考example;

参考链接