From 15c2b0d161a5c3bc6b05b3d9f6173749dd49f86f Mon Sep 17 00:00:00 2001 From: Abraham Elmahrek Date: Sun, 22 Jan 2017 12:10:32 -0800 Subject: [PATCH 1/4] change imports for react-native 0.39.x --- IntegrationTests/AppDelegate.m | 2 +- RNFSManager.h | 4 ++-- RNFSManager.m | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/IntegrationTests/AppDelegate.m b/IntegrationTests/AppDelegate.m index 309120ea..e5466b23 100644 --- a/IntegrationTests/AppDelegate.m +++ b/IntegrationTests/AppDelegate.m @@ -9,7 +9,7 @@ #import "AppDelegate.h" -#import +#import "RCTRootView.h" @implementation AppDelegate diff --git a/RNFSManager.h b/RNFSManager.h index 11ac97a3..c801aaef 100644 --- a/RNFSManager.h +++ b/RNFSManager.h @@ -6,8 +6,8 @@ // Copyright (c) 2015 Johannes Lumpe. All rights reserved. // -#import -#import +#import "RCTBridgeModule.h" +#import "RCTLog.h" @interface RNFSManager : NSObject diff --git a/RNFSManager.m b/RNFSManager.m index 4e145605..95c282d6 100644 --- a/RNFSManager.m +++ b/RNFSManager.m @@ -7,11 +7,11 @@ // #import "RNFSManager.h" -#import +#import "RCTBridge.h" #import "NSArray+Map.h" #import "Downloader.h" #import "Uploader.h" -#import +#import "RCTEventDispatcher.h" #import @interface RNFSManager() From 97ca02884b724f343b76120c98929553c08618cc Mon Sep 17 00:00:00 2001 From: Abraham Elmahrek Date: Tue, 31 Jan 2017 22:59:49 -0800 Subject: [PATCH 2/4] change imports for react-native 0.40.x --- IntegrationTests/AppDelegate.m | 4 ++++ RNFSManager.h | 9 +++++++++ RNFSManager.m | 14 ++++++++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/IntegrationTests/AppDelegate.m b/IntegrationTests/AppDelegate.m index e5466b23..45266a83 100644 --- a/IntegrationTests/AppDelegate.m +++ b/IntegrationTests/AppDelegate.m @@ -9,7 +9,11 @@ #import "AppDelegate.h" +#if __has_include("RCTRootView.h") #import "RCTRootView.h" +#else +#import +#endif @implementation AppDelegate diff --git a/RNFSManager.h b/RNFSManager.h index c801aaef..6a0ac81e 100644 --- a/RNFSManager.h +++ b/RNFSManager.h @@ -6,8 +6,17 @@ // Copyright (c) 2015 Johannes Lumpe. All rights reserved. // +#if __has_include("RCTBridgeModule.h") #import "RCTBridgeModule.h" +#else +#import +#endif + +#if __has_include("RCTLog.h") #import "RCTLog.h" +#else +#import +#endif @interface RNFSManager : NSObject diff --git a/RNFSManager.m b/RNFSManager.m index 95c282d6..141f3dcd 100644 --- a/RNFSManager.m +++ b/RNFSManager.m @@ -6,12 +6,22 @@ // Copyright (c) 2015 Johannes Lumpe. All rights reserved. // -#import "RNFSManager.h" +#if __has_include("RCTBridge.h") #import "RCTBridge.h" +#else +#import +#endif + +#if __has_include("RCTEventDispatcher.h") +#import "RCTEventDispatcher.h" +#else +#import +#endif + +#import "RNFSManager.h" #import "NSArray+Map.h" #import "Downloader.h" #import "Uploader.h" -#import "RCTEventDispatcher.h" #import @interface RNFSManager() From 8f22b9be01cecd9c09283d3789bb72acab64defa Mon Sep 17 00:00:00 2001 From: Abraham Elmahrek Date: Fri, 3 Feb 2017 15:36:26 -0800 Subject: [PATCH 3/4] order of imports matter --- RNFSManager.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/RNFSManager.m b/RNFSManager.m index 141f3dcd..82127e10 100644 --- a/RNFSManager.m +++ b/RNFSManager.m @@ -6,22 +6,24 @@ // Copyright (c) 2015 Johannes Lumpe. All rights reserved. // +#import "RNFSManager.h" + #if __has_include("RCTBridge.h") #import "RCTBridge.h" #else #import #endif +#import "NSArray+Map.h" +#import "Downloader.h" +#import "Uploader.h" + #if __has_include("RCTEventDispatcher.h") #import "RCTEventDispatcher.h" #else #import #endif -#import "RNFSManager.h" -#import "NSArray+Map.h" -#import "Downloader.h" -#import "Uploader.h" #import @interface RNFSManager() From b7253e86a003fd4457ef9446b3089f97789570d8 Mon Sep 17 00:00:00 2001 From: Abraham Elmahrek Date: Fri, 3 Feb 2017 23:48:07 -0800 Subject: [PATCH 4/4] Fix multiple import problem --- RNFSManager.m | 6 ------ 1 file changed, 6 deletions(-) diff --git a/RNFSManager.m b/RNFSManager.m index 82127e10..45da1d9e 100644 --- a/RNFSManager.m +++ b/RNFSManager.m @@ -8,12 +8,6 @@ #import "RNFSManager.h" -#if __has_include("RCTBridge.h") -#import "RCTBridge.h" -#else -#import -#endif - #import "NSArray+Map.h" #import "Downloader.h" #import "Uploader.h"