{"id":13743172,"url":"https://github.com/jpush/jpush-react-native","last_synced_at":"2025-05-13T22:06:04.643Z","repository":{"id":40212145,"uuid":"51740560","full_name":"jpush/jpush-react-native","owner":"jpush","description":"JPush's officially supported React Native plugin (Android \u0026 iOS). 极光推送官方支持的 React Native 插件（Android \u0026 iOS）。","archived":false,"fork":false,"pushed_at":"2025-05-09T02:52:22.000Z","size":84664,"stargazers_count":1358,"open_issues_count":160,"forks_count":345,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-05-09T03:38:12.728Z","etag":null,"topics":["android","ios","jpush","react","react-native"],"latest_commit_sha":null,"homepage":"http://docs.jiguang.cn","language":"Objective-C","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/jpush.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,"zenodo":null}},"created_at":"2016-02-15T08:18:56.000Z","updated_at":"2025-05-09T02:52:26.000Z","dependencies_parsed_at":"2022-06-27T01:02:12.220Z","dependency_job_id":"fc8194b1-de69-49c0-a100-28ae4147a5b1","html_url":"https://github.com/jpush/jpush-react-native","commit_stats":{"total_commits":611,"total_committers":37,"mean_commits":"16.513513513513512","dds":0.690671031096563,"last_synced_commit":"c085c9fcc7f0abb309965b686f3a7f91cf680dbc"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjpush-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjpush-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjpush-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjpush-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpush","download_url":"https://codeload.github.com/jpush/jpush-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514630,"owners_count":21920337,"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":["android","ios","jpush","react","react-native"],"created_at":"2024-08-03T05:00:41.814Z","updated_at":"2025-05-13T22:05:59.629Z","avatar_url":"https://github.com/jpush.png","language":"Objective-C","readme":"# JPush-React-Native\n\n## ChangeLog\n\n1. 从RN-JPush2.7.5开始，重新支持TypeScript\n2. 由于RN-JCore1.6.0存在编译问题，从RN-JCore1.7.0开始，还是需要在AndroidManifest.xml中添加配置代码，具体参考 配置-2.1 Android\n\n\n## 1. 安装\n\n```\nnpm install jpush-react-native --save\n```\n\n* 注意：如果项目里没有jcore-react-native，需要安装\n\n  ```\n  npm install jcore-react-native --save\n  ```\n安装完成后连接原生库\n进入到根目录执行\u003cbr/\u003e\nreact-native link\u003cbr/\u003e\n或\u003cbr/\u003e\nreact-native link jpush-react-native\u003cbr/\u003e\nreact-native link jcore-react-native\n\n## 2. 配置\n\n### 2.1 Android\n\n* build.gradle\n\n  ```\n  android {\n        defaultConfig {\n            applicationId \"yourApplicationId\"           //在此替换你的应用包名\n            ...\n            manifestPlaceholders = [\n                    JPUSH_APPKEY: \"yourAppKey\",         //在此替换你的APPKey\n                    JPUSH_CHANNEL: \"yourChannel\"        //在此替换你的channel\n            ]\n        }\n    }\n  ```\n\n  ```\n  dependencies {\n        ...\n        implementation project(':jpush-react-native')  // 添加 jpush 依赖\n        implementation project(':jcore-react-native')  // 添加 jcore 依赖\n    }\n  ```\n\n* setting.gradle\n\n  ```\n  include ':jpush-react-native'\n  project(':jpush-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/jpush-react-native/android')\n  include ':jcore-react-native'\n  project(':jcore-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/jcore-react-native/android')\n  ```\n\n* AndroidManifest.xml\n\n  ```\n  \u003cmeta-data\n  \tandroid:name=\"JPUSH_CHANNEL\"\n  \tandroid:value=\"${JPUSH_CHANNEL}\" /\u003e\n  \u003cmeta-data\n  \tandroid:name=\"JPUSH_APPKEY\"\n  \tandroid:value=\"${JPUSH_APPKEY}\" /\u003e    \n  ```\n\n### 2.2 iOS\n注意：您需要打开ios目录下的.xcworkspace文件修改您的包名\n\n### 2.2.1 pod\n\n```\npod install\n```\n\n* 注意：如果项目里使用pod安装过，请先执行命令\n\n  ```\n  pod deintegrate\n  ```\n\n### 2.2.2 手动方式\n\n* Libraries\n\n  ```\n  Add Files to \"your project name\"\n  node_modules/jcore-react-native/ios/RCTJCoreModule.xcodeproj\n  node_modules/jpush-react-native/ios/RCTJPushModule.xcodeproj\n  ```\n\n* Capabilities\n\n  ```\n  Push Notification --- ON\n  ```\n\n* Build Settings\n\n  ```\n  All --- Search Paths --- Header Search Paths --- +\n  $(SRCROOT)/../node_modules/jcore-react-native/ios/RCTJCoreModule/\n  $(SRCROOT)/../node_modules/jpush-react-native/ios/RCTJPushModule/\n  ```\n\n* Build Phases\n\n  ```\n  libz.tbd\n  libresolv.tbd\n  UserNotifications.framework\n  libRCTJCoreModule.a\n  libRCTJPushModule.a\n  ```\n\n## 3. 引用\n\n### 3.1 Android\n\n参考：[MainApplication.java](https://github.com/jpush/jpush-react-native/tree/master/example/android/app/src/main/java/com/example/MainApplication.java)\n\n### 3.2 iOS\n\n参考：[AppDelegate.m](https://github.com/jpush/jpush-react-native/tree/master/example/ios/example/AppDelegate.m) \n\n### 3.3 js\n\n参考：[App.js](https://github.com/jpush/jpush-react-native/blob/dev/example/App.js) \n\n## 4. API\n\n详见：[index.js](https://github.com/jpush/jpush-react-native/blob/master/index.js)\n\n## 5.  其他\n\n* 集成前务必将example工程跑通\n* 如有紧急需求请前往[极光社区](https://community.jiguang.cn/c/question)\n* 上报问题还麻烦先调用JPush.setLoggerEnable(true}，拿到debug日志\n\n \n\n","funding_links":[],"categories":["Objective-C  Stars 1000以内排名整理"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjpush-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpush%2Fjpush-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjpush-react-native/lists"}