{"id":19027957,"url":"https://github.com/kennytian/meiqia-react-native","last_synced_at":"2025-04-23T14:49:08.836Z","repository":{"id":34886771,"uuid":"186977778","full_name":"Kennytian/meiqia-react-native","owner":"Kennytian","description":"MeiQia SDK component for React Native","archived":false,"fork":false,"pushed_at":"2024-09-12T04:25:43.000Z","size":20855,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-18T00:56:59.010Z","etag":null,"topics":["meiqia","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/meiqia-react-native","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kennytian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-05-16T07:43:13.000Z","updated_at":"2024-09-12T04:25:44.000Z","dependencies_parsed_at":"2025-04-17T11:54:09.193Z","dependency_job_id":"34fbc44d-e386-48c3-a410-7df5f32e3609","html_url":"https://github.com/Kennytian/meiqia-react-native","commit_stats":{"total_commits":66,"total_committers":3,"mean_commits":22.0,"dds":0.303030303030303,"last_synced_commit":"f3bb7e0c416e3d73f7a7979740d071d5019657af"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kennytian%2Fmeiqia-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kennytian%2Fmeiqia-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kennytian%2Fmeiqia-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kennytian%2Fmeiqia-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kennytian","download_url":"https://codeload.github.com/Kennytian/meiqia-react-native/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250457030,"owners_count":21433723,"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":["meiqia","react-native"],"created_at":"2024-11-08T21:09:32.688Z","updated_at":"2025-04-23T14:49:08.808Z","avatar_url":"https://github.com/Kennytian.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MeiQia SDK for React Native\n\n[![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=flat-square)](https://github.com/996icu/996.ICU/blob/master/LICENSE)\n[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/Kennytian/meiqia-react-native/pulls)\n[![npm](https://img.shields.io/npm/v/meiqia-react-native.svg?style=flat-square)](https://www.npmjs.com/package/meiqia-react-native)\n[![Downloads](https://img.shields.io/npm/dm/meiqia-react-native.svg?style=flat-square)](https://www.npmjs.com/package/meiqia-react-native)\n[![GitHub contributors](https://img.shields.io/github/contributors/Kennytian/meiqia-react-native.svg?style=flat-square)](https://github.com/Kennytian/meiqia-react-native/graphs/contributors)\n[![GitHub last commit](https://img.shields.io/github/last-commit/Kennytian/meiqia-react-native.svg?style=flat-square)](https://github.com/Kennytian/meiqia-react-native/commits/master)\n![Platform - Android and iOS](https://img.shields.io/badge/platform-Android%20%7C%20iOS-yellow.svg?style=flat-square)\n\n## Getting started\n\n`$ npm install meiqia-react-native --save`\n\nor\n\n`$ yarn add meiqia-react-native`\n\n### Mostly automatic installation\n\n`$ react-native link meiqia-react-native`\n\n#### iOS\n1. Select you app target on XCode and click the `Build Settings` tab. Go to the `Framework Search Paths` section and `add` this new entry\n   ```\n   $(SRCROOT)/../node_modules/meiqia-react-native/ios\n   ```\n   and make sure it is set to `recursive`\n2. Select you app target on XCode and click the `Build Phases` tab. Go to the `Copy Bundle Resources` section and `add` this new entry\n   ```\n   node_modules/meiqia-react-native/ios/MeiQiaSDK/MQChatViewController/Assets/MQChatViewAsset.bundle\n   ``` \n### Manual installation\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `meiqia-react-native` and add `RNMeiqia.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNMeiqia.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Select you app target on XCode and click the `Build Settings` tab. Go to the `Framework Search Paths` section and add this new entry\n   ```\n   $(SRCROOT)/../node_modules/meiqia-react-native/ios\n   ```\n   and make sure it is set to `recursive`\n5. Select you app target on XCode and click the `Build Phases` tab. Go to the `Copy Bundle Resources` section and `add` this new entry\n   ```\n   node_modules/meiqia-react-native/ios/MeiQiaSDK/MQChatViewController/Assets/MQChatViewAsset.bundle\n   ``` \n6. Run your project (`Cmd+R`)\u003c\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainActivity.java`\n  - Add `import com.reactlibrary.RNMeiqiaPackage;` to the imports at the top of the file\n  - Add `new RNMeiqiaPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n   ```\n  \tinclude ':meiqia-react-native'\n  \tproject(':meiqia-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/meiqia-react-native/android')\n   ```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n   ```\n   compile project(':meiqia-react-native')\n   ```\n\n## Usage\n\n#### import\n```javascript\nimport { MeiqiaInit, MeiqiaShow } from 'meiqia-react-native';\n```\n\n#### init appKey\n```javascript\nMeiqiaInit({ appKey:'xxx' }).then((config)=\u003e{\n    console.log('config info:', config);\n    // {\"code:\": 0, \"clientId\": \"xxxxx\", \"message\": 'success'}\n});\n```\n\n#### launch chat window\n```javascript\nMeiqiaShow({}); \n```\nor, if you known\n\n```javascript\nMeiqiaShow({\n  titleColor: '',\n  titleBarColor: '', \n  naviColor: '', \n  clientInfo: {\n      name: 'Kenny锅',\n      gender: '男',\n      age: '20',\n      tel: '13800138000',\n      weixin: 'wechat007',\n      weibo: 'weibo007',\n      address: '湖北省武汉市xxx',\n      email: 'kenny@china.com',\n      avator: 'https://s3.cn-north-1.amazonaws.com.cn/pics.meiqia.bucket/1dee88eabfbd7bd4',\n      source: '朋友推荐',\n      comment: '全栈，就是了不起，备注也没问题'\n  }, \n  customId:{id:''}, \n  clientId:{id:''}, \n  scheduledInfo:{agentId:'', agentGroup:'', scheduleRule: 'none|group|enterprise', },\n});\n```\n\n\u003e Now, we can see the default chat window\n\n## APIs\n### MeiqiaInit\n\n`MeiqiaInit({param1, param2, ...});`\n\n| param name | param type | default value | platform\n| :------: | :------ | :------ | :------: |\n| appKey | string | required | all\n\n### MeiqiaShow\n\n`MeiqiaShow({param1, param2, ...});`\n\n| param name | param type | default value | platform\n| :------: | :------ | :------ | :------: |\n| titleColor | string | '#000000' | iOS\n| titleBarColor | string | '' | iOS\n| naviColor | string | '' | iOS\n| clientInfo | Object | {} | all\n| customId | Object | {} | all\n| clientId | Object | {} | all\n| scheduledInfo | Object | {} | all\n\n### MeiqiaStartService\n\n`MeiqiaStartService();`\n\n### MeiqiaStopService\n                     \n`MeiqiaStopService();`\n\n### MeiqiaRegisterDeviceToken\n\n`MeiqiaRegisterDeviceToken('xxxx-xxx-xxx');`\n\n\u003e NOTICE: This function only for iOS\n\n## Screenshot\n\n### Android\n\n![](./screenshot/screenshot1.png)\n\n![](./screenshot/screenshot2.png)\n\n### iOS\n![](./screenshot/screenshot3.png)\n\n## Debugging\n\n#### iOS\n\u003eQ: Why debugging on real device, the UI language is English?\n\nIn order to properly recognize the App's system language, you need to add a Localizations configuration. If you need to support English, Simplified Chinese, and Traditional Chinese, you need the following configuration in the Source Code of `info.plist`:\n\n```xml\n\u003ckey\u003eCFBundleLocalizations\u003c/key\u003e\n\u003carray\u003e\n    \u003cstring\u003ezh_CN\u003c/string\u003e\n    \u003cstring\u003ezh_TW\u003c/string\u003e\n    \u003cstring\u003een\u003c/string\u003e\n\u003c/array\u003e\n```\n\nor you also can run npm script: `node ./node_modules/meiqia-react-native/ios-configuration.js YOUR_APP_NAME`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennytian%2Fmeiqia-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkennytian%2Fmeiqia-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkennytian%2Fmeiqia-react-native/lists"}