From 05e671a146c2467f4cc96b65e6a8274f027dc2c7 Mon Sep 17 00:00:00 2001 From: tdzl2003 Date: Wed, 1 Mar 2017 12:52:37 +0800 Subject: [PATCH 1/8] bugfix --- ios/RCTHotUpdate/RCTHotUpdate.m | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/ios/RCTHotUpdate/RCTHotUpdate.m b/ios/RCTHotUpdate/RCTHotUpdate.m index 4960e85..9f75e29 100644 --- a/ios/RCTHotUpdate/RCTHotUpdate.m +++ b/ios/RCTHotUpdate/RCTHotUpdate.m @@ -6,22 +6,18 @@ // Copyright © 2016 erica. All rights reserved. // -#if __has_include() -#import -#import -#import "React/RCTEventDispatcher.h" -#import -#import -#import -#else - #import "RCTHotUpdate.h" #import "RCTHotUpdateDownloader.h" +#import "RCTHotUpdateManager.h" + +#if __has_include() +#import "React/RCTEventDispatcher.h" +#import +#import +#else #import "RCTEventDispatcher.h" #import "RCTConvert.h" -#import "RCTHotUpdateManager.h" #import "RCTLog.h" - #endif // From 97dc2adffb9ed34ad67884ee5002a108b59bc9b0 Mon Sep 17 00:00:00 2001 From: tdzl2003 Date: Wed, 1 Mar 2017 17:16:50 +0800 Subject: [PATCH 2/8] bugfix --- docs/guide.md | 3 ++- ios/RCTHotUpdate/RCTHotUpdate.h | 4 ++++ package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/guide.md b/docs/guide.md index 65cc331..80a8b6d 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -55,7 +55,8 @@ npm install --save react-native-update@3.x 1. 在XCode中的Project Navigator里,右键点击`Libraries` ➜ `Add Files to [你的工程名]` 2. 进入`node_modules` ➜ `react-native-update` ➜ `ios 并选中 `RCTHotUpdate.xcodeproj` 3. 在XCode中的project navigator里,选中你的工程,在 `Build Phases` ➜ `Link Binary With Libraries` 中添加 `libRCTHotUpdate.a` -4. Run your project (`Cmd+R`) +4. +5. Run your project (`Cmd+R`) #### Android diff --git a/ios/RCTHotUpdate/RCTHotUpdate.h b/ios/RCTHotUpdate/RCTHotUpdate.h index 1276bd3..da47c6e 100644 --- a/ios/RCTHotUpdate/RCTHotUpdate.h +++ b/ios/RCTHotUpdate/RCTHotUpdate.h @@ -6,7 +6,11 @@ // Copyright © 2016 erica. All rights reserved. // +#if __has_include() +#import +#else #import "RCTBridgeModule.h" +#endif @interface RCTHotUpdate : NSObject diff --git a/package.json b/package.json index 23a3591..73e8d8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "4.0.0", + "version": "4.0.3", "description": "react-native hot update", "main": "lib/index.js", "scripts": { From 0e2b72ffe0c4fa264c2f514dc56990c04d7cdbba Mon Sep 17 00:00:00 2001 From: DengYun Date: Wed, 1 Mar 2017 17:23:35 +0800 Subject: [PATCH 3/8] Update guide.md --- docs/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide.md b/docs/guide.md index 80a8b6d..d7e906a 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -55,7 +55,7 @@ npm install --save react-native-update@3.x 1. 在XCode中的Project Navigator里,右键点击`Libraries` ➜ `Add Files to [你的工程名]` 2. 进入`node_modules` ➜ `react-native-update` ➜ `ios 并选中 `RCTHotUpdate.xcodeproj` 3. 在XCode中的project navigator里,选中你的工程,在 `Build Phases` ➜ `Link Binary With Libraries` 中添加 `libRCTHotUpdate.a` -4. +4. 继续在`Build Settings`里搜索`Header Search Path`,添加$(SRCROOT)/../node_modules/react-native-update/ios 5. Run your project (`Cmd+R`) #### Android From c9726069ea3f1f3aa507e25e42d59965b12a8890 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Wed, 1 Mar 2017 22:29:16 +0800 Subject: [PATCH 4/8] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 91d5b13..5d0ea15 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,7 @@ React Native版本 | react-native-update版本 <= 0.26 | 1.0.x 0.27 - 0.28 | 2.x 0.29 - 0.33 | 3.x -0.34 - 0.39 | 4.x -0.40         |   暂不支持  +0.34 - 0.41 | 4.x ### 优势 From aee40586f5807fa1f23bfba5b944ee969c9cf027 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Wed, 1 Mar 2017 22:29:52 +0800 Subject: [PATCH 5/8] Update guide.md --- docs/guide.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/guide.md b/docs/guide.md index d7e906a..c66e6f7 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -38,8 +38,7 @@ React Native版本 | react-native-update版本 <= 0.26 | 1.0.x 0.27 - 0.28 | 2.x 0.29 - 0.33 | 3.x -0.34 - 0.39  |   4.x -0.40         |   暂不支持  +0.34 - 0.41  |   4.x 安装命令示例: ``` From e37adb3a61e5e0e932b861a332eb0daa3dec9202 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Thu, 2 Mar 2017 09:58:20 +0800 Subject: [PATCH 6/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d0ea15..4816a05 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ React Native版本 | react-native-update版本 <= 0.26 | 1.0.x 0.27 - 0.28 | 2.x 0.29 - 0.33 | 3.x -0.34 - 0.41 | 4.x +0.34 - 当前  |   4.x ### 优势 From 66b535b55c02b64dcbb83076247991d760e6f8c8 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Thu, 2 Mar 2017 09:58:43 +0800 Subject: [PATCH 7/8] Update guide.md --- docs/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide.md b/docs/guide.md index c66e6f7..7621233 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -38,7 +38,7 @@ React Native版本 | react-native-update版本 <= 0.26 | 1.0.x 0.27 - 0.28 | 2.x 0.29 - 0.33 | 3.x -0.34 - 0.41  |   4.x +0.34 - 当前  |   4.x 安装命令示例: ``` From c5b3db6c48ac0867358f3f680f60fcc7d0a21325 Mon Sep 17 00:00:00 2001 From: sunnylqm Date: Tue, 14 Mar 2017 10:24:02 +0800 Subject: [PATCH 8/8] support 0.42 --- local-cli/src/bundle.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/local-cli/src/bundle.js b/local-cli/src/bundle.js index 6768c4d..ddac802 100644 --- a/local-cli/src/bundle.js +++ b/local-cli/src/bundle.js @@ -382,10 +382,17 @@ export const commands = { let defaultConfig; if (major >= 0 && minor >= 33) { - defaultConfig= Config.get( - path.resolve('node_modules/react-native/local-cli'), - require(path.resolve('node_modules/react-native/local-cli/default.config')), - path.resolve('node_modules/react-native/packager/rn-cli.config.js')); + if (minor >= 42) { + defaultConfig= Config.get( + path.resolve('node_modules/react-native/local-cli'), + require(path.resolve('node_modules/react-native/local-cli/core/default.config')), + path.resolve('node_modules/react-native/packager/rn-cli.config.js')); + } else { + defaultConfig= Config.get( + path.resolve('node_modules/react-native/local-cli'), + require(path.resolve('node_modules/react-native/local-cli/default.config')), + path.resolve('node_modules/react-native/packager/rn-cli.config.js')); + } } else { defaultConfig= Config.get(path.resolve('node_modules/react-native/local-cli'), require(path.resolve('node_modules/react-native/local-cli/default.config'))); }