From b4638d65114d2f3c607b25b2a92c6ca1cdc05e3f Mon Sep 17 00:00:00 2001 From: BO KANG Date: Fri, 20 Jan 2017 15:12:00 -0800 Subject: [PATCH 1/4] Header changes --- ios/CodePush/CodePush.h | 2 ++ ios/CodePush/CodePush.m | 9 +++++++++ ios/CodePush/RCTConvert+CodePushInstallMode.m | 5 +++++ ios/CodePush/RCTConvert+CodePushUpdateState.m | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/ios/CodePush/CodePush.h b/ios/CodePush/CodePush.h index 08c5674c6..fc378927a 100644 --- a/ios/CodePush/CodePush.h +++ b/ios/CodePush/CodePush.h @@ -1,4 +1,6 @@ #if __has_include("RCTEventEmitter.h") +#import "RCTEventEmitter.h" +#elif __has_include() #import #else #import "React/RCTEventEmitter.h" // Required when used as a Pod in a Swift project diff --git a/ios/CodePush/CodePush.m b/ios/CodePush/CodePush.m index b13f65c88..3a85bb75a 100644 --- a/ios/CodePush/CodePush.m +++ b/ios/CodePush/CodePush.m @@ -1,9 +1,18 @@ +#if __has_include() #import #import #import #import #import #import +#else // back compatibility for RN version < 0.40 +#import "RCTAssert.h" +#import "RCTBridgeModule.h" +#import "RCTConvert.h" +#import "RCTEventDispatcher.h" +#import "RCTRootView.h" +#import "RCTUtils.h" +#endif #import "CodePush.h" diff --git a/ios/CodePush/RCTConvert+CodePushInstallMode.m b/ios/CodePush/RCTConvert+CodePushInstallMode.m index b8a4dda18..ddb547275 100644 --- a/ios/CodePush/RCTConvert+CodePushInstallMode.m +++ b/ios/CodePush/RCTConvert+CodePushInstallMode.m @@ -1,5 +1,10 @@ #import "CodePush.h" + +#if __has_include("RCTConvert.h") +#import "RCTConvert.h" +#else #import +#endif // Extending the RCTConvert class allows the React Native // bridge to handle args of type "CodePushInstallMode" diff --git a/ios/CodePush/RCTConvert+CodePushUpdateState.m b/ios/CodePush/RCTConvert+CodePushUpdateState.m index 8ca495c56..4a7050703 100644 --- a/ios/CodePush/RCTConvert+CodePushUpdateState.m +++ b/ios/CodePush/RCTConvert+CodePushUpdateState.m @@ -1,5 +1,10 @@ #import "CodePush.h" + +#if __has_include("RCTConvert.h") +#import "RCTConvert.h" +#else #import +#endif // Extending the RCTConvert class allows the React Native // bridge to handle args of type "CodePushUpdateState" From 763a130ebf9ca370044b45d71ef67f1891fe8161 Mon Sep 17 00:00:00 2001 From: BO KANG Date: Mon, 23 Jan 2017 18:17:37 -0800 Subject: [PATCH 2/4] update the IOS header linker --- ios/CodePush.xcodeproj/project.pbxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/ios/CodePush.xcodeproj/project.pbxproj b/ios/CodePush.xcodeproj/project.pbxproj index 30aaec4c6..8613506e8 100644 --- a/ios/CodePush.xcodeproj/project.pbxproj +++ b/ios/CodePush.xcodeproj/project.pbxproj @@ -370,7 +370,6 @@ "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../../react-native/React/**", - "$(SRCROOT)/../Examples/CodePushDemoApp/node_modules/react-native/React/**", ); LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_LDFLAGS = ( @@ -389,7 +388,6 @@ "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../../react-native/React/**", - "$(SRCROOT)/../Examples/CodePushDemoApp/node_modules/react-native/React/**", ); LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_LDFLAGS = ( From 951e3b67089e2cf71360c59fb4add4bebe1cdf35 Mon Sep 17 00:00:00 2001 From: BO KANG Date: Mon, 23 Jan 2017 19:03:46 -0800 Subject: [PATCH 3/4] test commit --- request-fetch-adapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/request-fetch-adapter.js b/request-fetch-adapter.js index 48715326b..3b99c0785 100644 --- a/request-fetch-adapter.js +++ b/request-fetch-adapter.js @@ -1,5 +1,5 @@ const packageJson = require("./package.json"); - +asdfasdf module.exports = { async request(verb, url, requestBody, callback) { if (typeof requestBody === "function") { @@ -49,4 +49,4 @@ function getHttpMethodName(verb) { "CONNECT", "PATCH" ][verb]; -} \ No newline at end of file +} From 60728078e3d85da616b725cb90e965b7a1487ce0 Mon Sep 17 00:00:00 2001 From: BO KANG Date: Mon, 23 Jan 2017 19:04:27 -0800 Subject: [PATCH 4/4] test commit 2 --- request-fetch-adapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request-fetch-adapter.js b/request-fetch-adapter.js index 3b99c0785..af075be98 100644 --- a/request-fetch-adapter.js +++ b/request-fetch-adapter.js @@ -1,5 +1,5 @@ const packageJson = require("./package.json"); -asdfasdf +asd module.exports = { async request(verb, url, requestBody, callback) { if (typeof requestBody === "function") {