From ad3b59297bf6367677ba7322886a258f9ce8946e Mon Sep 17 00:00:00 2001 From: Macrow Date: Tue, 21 Jan 2020 14:09:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3requiresMainQueueSetup?= =?UTF-8?q?=E8=AD=A6=E5=91=8A=EF=BC=8C=E5=B9=B6=E7=A7=BB=E9=99=A4rnpm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/RCTJMessageModule/RCTJMessageModule.m | 5 ++++ package.json | 31 ++++------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/ios/RCTJMessageModule/RCTJMessageModule.m b/ios/RCTJMessageModule/RCTJMessageModule.m index 45575fe..2d58a0e 100644 --- a/ios/RCTJMessageModule/RCTJMessageModule.m +++ b/ios/RCTJMessageModule/RCTJMessageModule.m @@ -53,6 +53,11 @@ - (id)init { return self; } ++ (BOOL)requiresMainQueueSetup +{ + return YES; +} + - (void)setBridge:(RCTBridge *)bridge { _bridge = bridge; JMessageHelper.shareInstance.launchOptions = _bridge.launchOptions; diff --git a/package.json b/package.json index 52e9178..3fc5e9f 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { - "name": "jmessage-react-plugin", - "version": "3.1.7", - "description": "a jmessage plugin for react native application", + "name": "jmessage-react-plugin-fix", + "version": "0.0.1", + "description": "a jmessage plugin for react native application(fix bugs by Macrow)", "main": "index.js", "repository": { "type": "git", - "url": "git@github.com:jpush/jmessage-react-plugin.git" + "url": "git@gitee.com:Macrow_wh/jmessage-react-plugin.git" }, "keywords": [ "react", "native", "jmessage" ], - "author": "KenChoi, huminiOS", + "author": "KenChoi, huminiOS, Macrow", "license": "ISC", "bugs": { "url": "https://github.com/jpush/jmessage-react-plugin/issues" @@ -20,27 +20,6 @@ "peerDependencies": { "jcore-react-native": ">= 1.2.11" }, - "rnpm": { - "ios": { - "sharedLibraries": [ - "libz", - "UserNotifications", - "CoreTelephony", - "Security", - "CFNetwork", - "CoreFoundation", - "SystemConfiguration", - "Foundation", - "UIKit", - "libresolv", - "CoreGraphics", - "CoreAudio", - "AudioToolbox", - "MobileCoreServices", - "libsqlite3" - ] - } - }, "homepage": "https://github.com/jpush/jmessage-react-plugin#readme", "dependencies": { "jcore-react-native": ">=1.3.1" From 0089b1ad2c3f09ec8a775e9479bc21f6b886961f Mon Sep 17 00:00:00 2001 From: Macrow Date: Tue, 21 Jan 2020 14:12:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=A7=BB=E9=99=A4rnpm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3fc5e9f..97db605 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { - "name": "jmessage-react-plugin-fix", - "version": "0.0.1", - "description": "a jmessage plugin for react native application(fix bugs by Macrow)", + "name": "jmessage-react-plugin", + "version": "3.1.7", + "description": "a jmessage plugin for react native application", "main": "index.js", "repository": { "type": "git", - "url": "git@gitee.com:Macrow_wh/jmessage-react-plugin.git" + "url": "git@github.com:jpush/jmessage-react-plugin.git" }, "keywords": [ "react", "native", "jmessage" ], - "author": "KenChoi, huminiOS, Macrow", + "author": "KenChoi, huminiOS", "license": "ISC", "bugs": { "url": "https://github.com/jpush/jmessage-react-plugin/issues" From 1d396ad551382f81d7ad8c5df9f4b4490ff39885 Mon Sep 17 00:00:00 2001 From: Macrow Date: Tue, 21 Jan 2020 14:21:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0autolink=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index a9e07d3..06a37a1 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,30 @@ protected List getPackages() { -framework "JMessage" ``` +#### 使用Autolink + +``` +yarn add jmessage-react-plugin +touch react-native.config.js +cd ios +pod install +``` +在刚刚创建的react-native.config.js文件(位于项目根目录)中,粘贴下面的内容 +``` +module.exports = { + dependencies: { + 'jmessage-react-plugin': { + platforms: { + android: { + packageInstance: 'new JMessageReactPackage(false)' + } + } + }, + } +}; +``` +注意:上面的初始化参数,是true还是false,根据你自己的需要填入即可 +然后按照上面的配置说明进行配置即可使用 ## API