{"id":15024964,"url":"https://github.com/hecom-rn/react-native-im-easemob","last_synced_at":"2025-07-12T19:34:53.958Z","repository":{"id":37752397,"uuid":"135660988","full_name":"hecom-rn/react-native-im-easemob","owner":"hecom-rn","description":"环信IM的原生接口React-Native封装库。","archived":false,"fork":false,"pushed_at":"2024-10-24T08:33:25.000Z","size":52919,"stargazers_count":18,"open_issues_count":5,"forks_count":9,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-25T05:13:29.395Z","etag":null,"topics":["easemob","instant-messaging","react-native"],"latest_commit_sha":null,"homepage":"http://docs.easemob.com/im/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hecom-rn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-01T03:04:25.000Z","updated_at":"2024-07-08T07:29:04.000Z","dependencies_parsed_at":"2023-11-13T09:43:00.144Z","dependency_job_id":"8937f400-38dd-48e8-8a96-ad3b92b75911","html_url":"https://github.com/hecom-rn/react-native-im-easemob","commit_stats":{"total_commits":266,"total_committers":11,"mean_commits":"24.181818181818183","dds":0.6278195488721805,"last_synced_commit":"1e2ce6c996fadba0df8435f153827da4dc685f47"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Freact-native-im-easemob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Freact-native-im-easemob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Freact-native-im-easemob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecom-rn%2Freact-native-im-easemob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hecom-rn","download_url":"https://codeload.github.com/hecom-rn/react-native-im-easemob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229956925,"owners_count":18150864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["easemob","instant-messaging","react-native"],"created_at":"2024-09-24T20:01:17.269Z","updated_at":"2024-12-18T21:09:00.892Z","avatar_url":"https://github.com/hecom-rn.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-im-easemob\n\n[![npm version](https://img.shields.io/npm/v/react-native-im-easemob.svg?style=flat)](https://www.npmjs.com/package/react-native-im-easemob)\n[![Build Status](https://travis-ci.org/hecom-rn/react-native-im-easemob.svg?branch=master)](https://travis-ci.org/hecom-rn/react-native-im-easemob)\n\n环信IM的原生接口React-Native封装库。\n\n## 安装\n\n使用Yarn安装:\n\n```\nyarn add react-native-im-easemob\n```\n\n使用npm安装:\n\n```\nnpm install --save react-native-im-easemob\n```\n\n## iOS环境设置\n\n添加Podfile，类似如下格式：\n\n```perl\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\n\ndef common_target\n    pod 'MJExtension', :git =\u003e 'https://github.com/RNCommon/MJExtension.git', :commit =\u003e 'cd3de71c4955935a762a46e59d90160991f5fa92'\n    // React target and other common target...\nend\n\ntarget \"MainTarget\" do\n    common_target\n    pod 'Hyphenate', '= 3.6.2'\n    pod 'react-native-im-easemob/Dev', :path =\u003e '../node_modules/react-native-im-easemob'\nend\n\ntarget \"DeployTarget\" do\n    common_target\n    pod 'HySDKDeploy', '= 3.6.2'\n    pod 'react-native-im-easemob/Deploy', :path =\u003e '../node_modules/react-native-im-easemob'\nend\n```\n\n其中MainTarget是真机和模拟器通用的部署Target，主要用于调试。DeployTarget是只支持armv7和arm64的Target，主要用于打包发布。\n\n这是因为环信SDK的原因，`Hyphenate`打包需要使用`lipo`来处理`Hyphenate.framework`，从中剔除i386和x86_64的模拟器框架。具体原因请参照环信文档。\n\n## Android环境设置\n\n在settings.gradle文件中添加：\n\n```\ninclude ':react-native-im-easemob'\nproject(':react-native-im-easemob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-im-easemob/android')\n```\n\n在module级的build.gradle中添加：\n\n```\ndependencies {\n    implementation project(':react-native-im-easemob')\n}\n```\n\n在ReactNativeHost中添加：\n\n```\nimport com.im.easemob.EasemobPackage;\n\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n    return Arrays.\u003cReactPackage\u003easList(\n        new EasemobPackage()\n    );\n}\n```\n\nAndroid离线推送接收消息，需要配置appId和appKey或者appId和AappSecret\n(不同的手机需要配置的不一样，具体参考环信文档：http://docs-im.easemob.com/im/android/push/thirdpartypush)\n在主工程中的AndroidManifest.xml中配置appId和appKey或者appId和AappSecret\n```\n \u003c!-- start  离线推送配置appId和appSecret(小米，oppo,meizu)--\u003e\n        \u003cmeta-data\n            android:name=\"IM_EASEMOB_XIAOMI_PUSH_APP_ID\"\n            android:value=\"替换成你自己申请的小米APP_ID\" /\u003e\n        \u003cmeta-data\n            android:name=\"IM_EASEMOB_XIAOMI_PUSH_APP_KEY\"\n            android:value=\"替换成你自己申请的小米APP_KEY\" /\u003e\n\n        \u003cmeta-data\n            android:name=\"IM_EASEMOB_OPPO_PUSH_APP_KEY\"\n            android:value=\"替换成你自己申请的OPPO的APP_KEY\" /\u003e\n        \u003cmeta-data\n            android:name=\"IM_EASEMOB_OPPO_PUSH_APP_SECRET\"\n            android:value=\"替换成你自己申请的OPPO的APP_SECRET\" /\u003e\n\n        \u003cmeta-data\n            android:name=\"IM_EASEMOB_MEIZU_PUSH_APP_ID\"\n            android:value=\"替换成你自己申请的魅族的APP_ID\" /\u003e\n        \u003cmeta-data\n            android:name=\"IM_EASEMOB_MEIZU_PUSH_APP_KEY\"\n            android:value=\"替换成你自己申请的魅族的APP_KEY\" /\u003e\n        \u003c!--end      离线推送配置appId和appSecret(小米，oppo,meizu)--\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecom-rn%2Freact-native-im-easemob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhecom-rn%2Freact-native-im-easemob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecom-rn%2Freact-native-im-easemob/lists"}