{"id":25345419,"url":"https://github.com/devengagelab/push-rectnative-plugin","last_synced_at":"2025-10-29T14:31:10.095Z","repository":{"id":64031397,"uuid":"566686389","full_name":"DevEngageLab/push-rectnative-plugin","owner":"DevEngageLab","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-10T09:45:51.000Z","size":33672,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T10:29:41.384Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/DevEngageLab.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":"2022-11-16T07:47:29.000Z","updated_at":"2025-02-10T09:45:55.000Z","dependencies_parsed_at":"2023-01-14T19:45:57.287Z","dependency_job_id":"4546de2a-41f0-469e-93f9-45bf6c52371a","html_url":"https://github.com/DevEngageLab/push-rectnative-plugin","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevEngageLab%2Fpush-rectnative-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevEngageLab%2Fpush-rectnative-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevEngageLab%2Fpush-rectnative-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevEngageLab%2Fpush-rectnative-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevEngageLab","download_url":"https://codeload.github.com/DevEngageLab/push-rectnative-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238840115,"owners_count":19539489,"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":[],"created_at":"2025-02-14T12:27:21.970Z","updated_at":"2025-10-29T14:31:04.752Z","avatar_url":"https://github.com/DevEngageLab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MTPush-React-Native\n\n## 1. Setup\n\nAdd the mtpush-react-native package to your project.\n\n```\nnpm install mtpush-react-native --save\n```\n\nIf using React Native version higher than0.60 skip to step 2 because [Autolinking is now done automatically](https://reactnative.dev/blog/2019/07/03/version-60#native-modules-are-now-autolinked) .\n\nIf using React Native 0.60 or lower, run: \n\n```\nreact-native link mtpush-react-native\n```\n\n\n### 2. Android Setup\n\n* build.gradle\n\n```\n\n// Top-level build file where you can add configuration options common to all sub-projects/modules.\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n        // huawei push need. If you do not need huawei channel，delete it.\n        maven { url 'https://developer.huawei.com/repo/' }\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:4.1.0'\n        // google push need，and google push need AndroidX. If you do not need google channel，delete it.\n        // Please add android.useAndroidX=true in gradle.properties\n        classpath 'com.google.gms:google-services:4.3.15'\n        // huawei push need，if you do not need huawei channel，delete it.\n        classpath 'com.huawei.agconnect:agcp:1.6.0.300'\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n        // huawei push need，if you do not need huawei channel，delete it.\n        maven { url 'https://developer.huawei.com/repo/' }\n    }\n}\n```\n\n\n  ```\n  plugins {\n    id 'com.android.application'\n    id 'com.facebook.react'\n    // google push need. If you do not need google channel，delete it.\n    id 'com.google.gms.google-services'\n    // huawei push need，if you do not need huawei channel，delete it.\n    id 'com.huawei.agconnect'\n}\n\n  android {\n        // google/huawei push need，it needs to be the same as the one on google/huawei console.\n    signingConfigs {\n        debug {\n            storeFile file(\"android.keystore\")\n            storePassword \"123456\"\n            keyAlias \"keyAlias\"\n            keyPassword \"123456\"\n        }\n        release {\n            storeFile file(\"android.keystore\")\n            storePassword \"123456\"\n            keyAlias \"keyAlias\"\n            keyPassword \"123456\"\n        }\n    }\n\n        defaultConfig {\n            applicationId \"yourApplicationId\"           //Replace your app package name here\n            ...\n            manifestPlaceholders = [\n                    ENGAGELAB_PRIVATES_APPKEY: \"yourAppKey\", //Replace your APPKey here\n                    ENGAGELAB_PRIVATES_CHANNEL: \"yourChannel\", //Replace your channel here\n                    ENGAGELAB_PRIVATES_PROCESS: \":remote\", // Fill in the process where Engagelab sdk works here\n                    ENGAGELAB_PRIVATES_SITE_NAME: \"\" // The name of the data center is optional. If not filled in, it defaults to the Singapore data center.\n                     // The mi client configuration needs to be the same as that on the Xiaomi console, and the server configuration needs to be configured on the Portal console.\n                    XIAOMI_APPID            : \"MI-xxx\",\n                    XIAOMI_APPKEY           : \"MI-xxx\",\n                    // The meizu client configuration needs to be the same as that on the Meizu console. It also needs to be configured on the Portal console.\n                    MEIZU_APPID             : \"MZ-xxx\",\n                    MEIZU_APPKEY            : \"MZ-xxx\",\n                    // The oppo client configuration needs to be the same as that on the oppo console. You also need to configure the server configuration in the Portal console.\n                    OPPO_APPID              : \"OP-xxx\",\n                    OPPO_APPKEY             : \"OP-xxx\",\n                    OPPO_APPSECRET          : \"OP-xxx\",\n                    // The vivo client configuration needs to be the same as that on the vivo console, and the server configuration needs to be configured in the Portal console.\n                    VIVO_APPID              : \"xxx\",\n                    VIVO_APPKEY             : \"xxx\",\n                    HONOR_APPID             : \"xxx\",\n            ]\n        }\n\n        // google push need java 1.8. If you do not need google channel，delete it.\n        compileOptions {\n          sourceCompatibility JavaVersion.VERSION_1_8\n          targetCompatibility JavaVersion.VERSION_1_8\n        }\n    }\n  ```\n\n  ```\n  dependencies {\n        ...\n        implementation project(':mtpush-react-native')  // Add mtpush dependency\n    }\n  ```\n\n* setting.gradle\n\n  ```\n  include ':mtpush-react-native'\n  project(':mtpush-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/mtpush-react-native/android')\n  ```\n\n* The huawei channel requires the `agconnect-services.json` file, which is configured in the module directory of the application. Please obtain it from [huawei channel console](https://developer.huawei.com/consumer/cn/console#/serviceCards/)\n* Google channel requires the `google-services.json` file, which is configured in the module directory of the application. Please obtain it from [google channel console](https://console.firebase.google.com)\n* If the meizu channel cannot obtain the token, try adding android.enableR8 = false in gradle.properties to close R8.\n\n\n### 3. iOS Setup\nNote: You need to open the .xcworkspace file in the ios directory to modify your package name\n\n### 3.1 pod\n\n```\npod install\n```\n\n* Note: If the project has been installed using pod, please execute the command first\n\n  ```\n  pod deintegrate\n  ```\n\n### 3.2 Manual\n\n* Libraries\n\n  ```\n  Add Files to \"your project name\"\n  node_modules/mtpush-react-native/ios/RCTMTPushModule.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/mtpush-react-native/ios/RCTMTPushModule/\n  ```\n\n* Build Phases\n\n  ```\n  libz.tbd\n  libresolv.tbd\n  UserNotifications.framework\n  libRCTMTPushModule.a\n  ```\n\n## 4. Quote\n\n### 4.1 Android\n\nrefer to：[MainApplication.java](https://github.com/DevEngageLab/push-rectnative-plugin/tree/master/example/android/app/src/main/java/com/example/MainApplication.java)\n\n### 4.2 iOS\n\nrefer to：[AppDelegate.m](https://github.com/DevEngageLab/push-rectnative-plugin/tree/master/example/ios/example/AppDelegate.mm) \n\n### 4.3 js\n\nrefer to：[App.js](https://github.com/DevEngageLab/push-rectnative-plugin/blob/main/example/App.js) \n\n## 5. API\n\nrefer to：[index.js](https://github.com/DevEngageLab/push-rectnative-plugin/blob/master/index.js)\n\n## 6.  Other\n* Be sure to run the example project before integration.\n* If you have urgent needs, please go to [EngageLab Community](https://www.engagelab.com/)\n* If you want to report a problem, please call `MTPush.setLoggerEnable(true}` first to get the debug log.\n\n \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevengagelab%2Fpush-rectnative-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevengagelab%2Fpush-rectnative-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevengagelab%2Fpush-rectnative-plugin/lists"}