From 47665a0603e121d5354e25d57a7664947b8ba840 Mon Sep 17 00:00:00 2001 From: James Treanor Date: Mon, 24 Jun 2019 14:36:30 +0100 Subject: [PATCH 1/8] Update HEADER_SEARCH_PATHS to include DoubleConversion to fix build errors in several podspecs --- ReactCommon/cxxreact/React-cxxreact.podspec | 2 +- ReactCommon/jscallinvoker/React-jscallinvoker.podspec | 2 +- ReactCommon/jsi/React-jsi.podspec | 2 +- ReactCommon/jsiexecutor/React-jsiexecutor.podspec | 2 +- ReactCommon/turbomodule/core/React-turbomodule-core.podspec | 2 +- .../turbomodule/samples/React-turbomodule-samples.podspec | 3 ++- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ReactCommon/cxxreact/React-cxxreact.podspec b/ReactCommon/cxxreact/React-cxxreact.podspec index 9613929748decb..3f1a214f0d20eb 100644 --- a/ReactCommon/cxxreact/React-cxxreact.podspec +++ b/ReactCommon/cxxreact/React-cxxreact.podspec @@ -33,7 +33,7 @@ Pod::Spec.new do |s| s.source_files = "*.{cpp,h}" s.exclude_files = "SampleCxxModule.*" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.header_dir = "cxxreact" s.dependency "boost-for-react-native", "1.63.0" diff --git a/ReactCommon/jscallinvoker/React-jscallinvoker.podspec b/ReactCommon/jscallinvoker/React-jscallinvoker.podspec index 383216404ab3ab..335e59929b82fd 100644 --- a/ReactCommon/jscallinvoker/React-jscallinvoker.podspec +++ b/ReactCommon/jscallinvoker/React-jscallinvoker.podspec @@ -33,7 +33,7 @@ Pod::Spec.new do |s| s.source_files = "jsireact/*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags s.header_dir = "jsireact" - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.dependency "React-cxxreact", version s.dependency "Folly", folly_version diff --git a/ReactCommon/jsi/React-jsi.podspec b/ReactCommon/jsi/React-jsi.podspec index 0b0ff66eb581e8..b297c5fedfe0ad 100644 --- a/ReactCommon/jsi/React-jsi.podspec +++ b/ReactCommon/jsi/React-jsi.podspec @@ -34,7 +34,7 @@ Pod::Spec.new do |s| s.exclude_files = "**/test/*" s.framework = "JavaScriptCore" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.header_dir = "jsi" s.default_subspec = "Default" diff --git a/ReactCommon/jsiexecutor/React-jsiexecutor.podspec b/ReactCommon/jsiexecutor/React-jsiexecutor.podspec index d8c6f70fbc92f9..6ee7e3c9067643 100644 --- a/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +++ b/ReactCommon/jsiexecutor/React-jsiexecutor.podspec @@ -32,7 +32,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "jsireact/*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.header_dir = "jsireact" s.dependency "React-cxxreact", version diff --git a/ReactCommon/turbomodule/core/React-turbomodule-core.podspec b/ReactCommon/turbomodule/core/React-turbomodule-core.podspec index 7b93bc87f17332..6f0402d0f7e042 100644 --- a/ReactCommon/turbomodule/core/React-turbomodule-core.podspec +++ b/ReactCommon/turbomodule/core/React-turbomodule-core.podspec @@ -32,8 +32,8 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\"" } s.header_dir = "jsireact" + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.xcconfig = { "OTHER_CFLAGS" => "$(inherited) -DRN_TURBO_MODULE_ENABLED" } s.dependency "React-Core", version diff --git a/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec b/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec index e7cde973e42f43..7f2f8256eef7ba 100644 --- a/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec +++ b/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec @@ -32,8 +32,8 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\"" } s.header_dir = "jsireact" + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.xcconfig = { "OTHER_CFLAGS" => "$(inherited) -DRN_TURBO_MODULE_ENABLED" } s.dependency "React-Core", version @@ -41,6 +41,7 @@ Pod::Spec.new do |s| s.dependency "React-jsi", version s.dependency "React-turbomodule-core", version s.dependency "Folly", folly_version + s.dependency "DoubleConversion" s.subspec "samples-ios" do |ss| ss.source_files = "platform/ios/*.{mm,cpp,h}" From 45c35d2bf474127ac28776df0348cd43e04e9b34 Mon Sep 17 00:00:00 2001 From: James Treanor Date: Mon, 24 Jun 2019 14:38:24 +0100 Subject: [PATCH 2/8] Update header_files in yoga.podspec to avoid C++ build errors --- ReactCommon/yoga/yoga.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/yoga/yoga.podspec b/ReactCommon/yoga/yoga.podspec index fd17f019cd4176..a1e6b9cf345ad5 100644 --- a/ReactCommon/yoga/yoga.podspec +++ b/ReactCommon/yoga/yoga.podspec @@ -47,7 +47,7 @@ Pod::Spec.new do |spec| source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION'] spec.source_files = source_files - header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue,YGStyle,CompactValue,YGFloatOptional,Yoga-internal,YGNode,YGConfig,YGLayout,YGMarker}.h' + header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h' header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION'] spec.public_header_files = header_files end From c2dc45a857720dd97094e70d55b04977c5bf9ec7 Mon Sep 17 00:00:00 2001 From: James Treanor Date: Mon, 24 Jun 2019 14:39:20 +0100 Subject: [PATCH 3/8] Add glog and React-jsi as dependencies of React-Core to fix undefined symbols errors --- React/React-Core.podspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/React/React-Core.podspec b/React/React-Core.podspec index 07b250db4c6b72..d687b2000d94d9 100644 --- a/React/React-Core.podspec +++ b/React/React-Core.podspec @@ -49,6 +49,8 @@ Pod::Spec.new do |s| s.dependency "Folly", folly_version s.dependency "React-cxxreact", version + s.dependency "React-jsi", version s.dependency "React-jsiexecutor", version s.dependency "yoga", "#{version}.React" + s.dependency "glog" end From 9da7252fa2736f6d80d65dcac06619fe72c5c1c0 Mon Sep 17 00:00:00 2001 From: James Treanor Date: Mon, 24 Jun 2019 14:41:32 +0100 Subject: [PATCH 4/8] Update header_dir in Library podspecs so that they do not conflict with React/ imports --- Libraries/ART/React-ART.podspec | 2 +- Libraries/ActionSheetIOS/React-RCTActionSheet.podspec | 2 +- Libraries/Blob/RCTBlobManager.mm | 4 ++-- Libraries/Blob/React-RCTBlob.podspec | 3 ++- Libraries/Image/RCTGIFImageDecoder.h | 2 +- Libraries/Image/RCTImageCache.h | 2 +- Libraries/Image/RCTImageCache.m | 4 ++-- Libraries/Image/RCTImageLoader.h | 2 +- Libraries/Image/RCTImageLoader.m | 4 ++-- Libraries/Image/RCTImageUtils.h | 2 +- Libraries/Image/RCTImageView.h | 2 +- Libraries/Image/RCTLocalAssetImageLoader.h | 2 +- Libraries/Image/React-RCTImage.podspec | 2 +- Libraries/LinkingIOS/React-RCTLinking.podspec | 2 +- Libraries/NativeAnimation/React-RCTAnimation.podspec | 2 +- Libraries/Network/RCTNetworkTask.m | 2 +- Libraries/Network/RCTNetworking.h | 2 +- Libraries/Network/RCTNetworking.mm | 4 ++-- Libraries/Network/React-RCTNetwork.podspec | 2 +- .../PushNotificationIOS/React-RCTPushNotification.podspec | 2 +- Libraries/Settings/React-RCTSettings.podspec | 2 +- Libraries/Text/React-RCTText.podspec | 2 +- Libraries/Vibration/React-RCTVibration.podspec | 2 +- Libraries/WebSocket/React-RCTWebSocket.podspec | 2 +- RNTester/RCTTest/React-RCTTest.podspec | 2 +- React/DevSupport/RCTInspectorDevServerHelper.h | 2 +- React/DevSupport/RCTPackagerClient.m | 2 +- React/DevSupport/RCTPackagerConnection.mm | 6 +++--- React/Fabric/RCTSurfacePresenter.mm | 2 +- React/React-DevSupport.podspec | 3 ++- .../fabric/imagemanager/platform/ios/ImageManager.mm | 2 +- .../fabric/imagemanager/platform/ios/RCTImageManager.mm | 2 +- .../platform/ios/RCTImagePrimitivesConversions.h | 2 +- ReactCommon/jscallinvoker/React-jscallinvoker.podspec | 2 +- .../jscallinvoker/jsireact/BridgeJSCallInvoker.cpp | 2 +- ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.h | 2 +- .../turbomodule/core/React-turbomodule-core.podspec | 3 +-- ReactCommon/turbomodule/core/TurboCxxModule.cpp | 2 +- ReactCommon/turbomodule/core/TurboModule.h | 2 +- ReactCommon/turbomodule/core/TurboModuleBinding.cpp | 2 +- ReactCommon/turbomodule/core/TurboModuleBinding.h | 2 +- ReactCommon/turbomodule/core/TurboModuleUtils.h | 2 +- .../turbomodule/core/platform/ios/RCTTurboModule.h | 4 ++-- .../turbomodule/core/platform/ios/RCTTurboModule.mm | 8 ++++---- .../core/platform/ios/RCTTurboModuleManager.mm | 6 +++--- .../samples/NativeSampleTurboCxxModuleSpecJSI.h | 2 +- .../turbomodule/samples/React-turbomodule-samples.podspec | 5 +++-- ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp | 2 +- .../samples/platform/ios/RCTNativeSampleTurboModuleSpec.h | 2 +- .../samples/platform/ios/RCTSampleTurboCxxModule.h | 2 +- .../samples/platform/ios/RCTSampleTurboCxxModule.mm | 2 +- 51 files changed, 67 insertions(+), 65 deletions(-) diff --git a/Libraries/ART/React-ART.podspec b/Libraries/ART/React-ART.podspec index c7bd0d259b8376..32fd32bd1fb2f6 100644 --- a/Libraries/ART/React-ART.podspec +++ b/Libraries/ART/React-ART.podspec @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "**/*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "ART" s.dependency "React-Core", version end diff --git a/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec b/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec index 9cc25ab1e7501a..07dfc6d858b8b2 100644 --- a/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +++ b/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTActionSheet" s.dependency "React-Core", version end diff --git a/Libraries/Blob/RCTBlobManager.mm b/Libraries/Blob/RCTBlobManager.mm index 9e8faeb7b149ca..08e308eee6fd6a 100755 --- a/Libraries/Blob/RCTBlobManager.mm +++ b/Libraries/Blob/RCTBlobManager.mm @@ -10,9 +10,9 @@ #import #import -#import +#import #import -#import +#import #import "RCTBlobCollector.h" static NSString *const kBlobURIScheme = @"blob"; diff --git a/Libraries/Blob/React-RCTBlob.podspec b/Libraries/Blob/React-RCTBlob.podspec index 55ab585abd88ea..6f7731d28ae418 100644 --- a/Libraries/Blob/React-RCTBlob.podspec +++ b/Libraries/Blob/React-RCTBlob.podspec @@ -28,9 +28,10 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m,mm}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTBlob" s.dependency "React-Core", version + s.dependency "React-jsi", version s.dependency "React-RCTNetwork", version s.dependency "React-RCTWebSocket", version end diff --git a/Libraries/Image/RCTGIFImageDecoder.h b/Libraries/Image/RCTGIFImageDecoder.h index f9cc0eef4ebf94..56222eebdfd9a7 100644 --- a/Libraries/Image/RCTGIFImageDecoder.h +++ b/Libraries/Image/RCTGIFImageDecoder.h @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#import +#import "RCTImageLoader.h" @interface RCTGIFImageDecoder : NSObject diff --git a/Libraries/Image/RCTImageCache.h b/Libraries/Image/RCTImageCache.h index b7acc1126ca6cd..3ee09c974d3727 100644 --- a/Libraries/Image/RCTImageCache.h +++ b/Libraries/Image/RCTImageCache.h @@ -7,7 +7,7 @@ #import -#import +#import "RCTImageLoader.h" @interface RCTImageCache : NSObject @end diff --git a/Libraries/Image/RCTImageCache.m b/Libraries/Image/RCTImageCache.m index a6546a7e26ce17..5d4a9a06717fe5 100644 --- a/Libraries/Image/RCTImageCache.m +++ b/Libraries/Image/RCTImageCache.m @@ -12,9 +12,9 @@ #import #import -#import +#import #import -#import +#import "RCTResizeMode.h" #import "RCTImageUtils.h" diff --git a/Libraries/Image/RCTImageLoader.h b/Libraries/Image/RCTImageLoader.h index 9e5ff9f8c5de61..ec9582832994bb 100644 --- a/Libraries/Image/RCTImageLoader.h +++ b/Libraries/Image/RCTImageLoader.h @@ -8,7 +8,7 @@ #import #import -#import +#import "RCTResizeMode.h" #import typedef void (^RCTImageLoaderProgressBlock)(int64_t progress, int64_t total); diff --git a/Libraries/Image/RCTImageLoader.m b/Libraries/Image/RCTImageLoader.m index 13a485f4122ead..b9c8e9d64de681 100644 --- a/Libraries/Image/RCTImageLoader.m +++ b/Libraries/Image/RCTImageLoader.m @@ -12,9 +12,9 @@ #import #import -#import +#import "RCTImageLoader.h" #import -#import +#import #import #import "RCTImageCache.h" diff --git a/Libraries/Image/RCTImageUtils.h b/Libraries/Image/RCTImageUtils.h index a4b8216c401dc2..8c4331984c92c5 100644 --- a/Libraries/Image/RCTImageUtils.h +++ b/Libraries/Image/RCTImageUtils.h @@ -9,7 +9,7 @@ #import #import -#import +#import "RCTResizeMode.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Libraries/Image/RCTImageView.h b/Libraries/Image/RCTImageView.h index 24c56d448ba3fb..39506f155e96d7 100644 --- a/Libraries/Image/RCTImageView.h +++ b/Libraries/Image/RCTImageView.h @@ -7,7 +7,7 @@ #import #import -#import +#import "RCTResizeMode.h" @class RCTBridge; @class RCTImageSource; diff --git a/Libraries/Image/RCTLocalAssetImageLoader.h b/Libraries/Image/RCTLocalAssetImageLoader.h index df3918ad548c1a..6d00619b794ea2 100644 --- a/Libraries/Image/RCTLocalAssetImageLoader.h +++ b/Libraries/Image/RCTLocalAssetImageLoader.h @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#import +#import "RCTImageLoader.h" @interface RCTLocalAssetImageLoader : NSObject diff --git a/Libraries/Image/React-RCTImage.podspec b/Libraries/Image/React-RCTImage.podspec index 01ee7fb7cdf826..9fa302bd3fc8aa 100644 --- a/Libraries/Image/React-RCTImage.podspec +++ b/Libraries/Image/React-RCTImage.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTImage" s.dependency "React-Core", version s.dependency "React-RCTNetwork", version diff --git a/Libraries/LinkingIOS/React-RCTLinking.podspec b/Libraries/LinkingIOS/React-RCTLinking.podspec index e111a64a23e302..060d9bd5ea6b02 100644 --- a/Libraries/LinkingIOS/React-RCTLinking.podspec +++ b/Libraries/LinkingIOS/React-RCTLinking.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTLinking" s.dependency "React-Core", version end diff --git a/Libraries/NativeAnimation/React-RCTAnimation.podspec b/Libraries/NativeAnimation/React-RCTAnimation.podspec index ddab24fba42b04..63c3457d6f3e34 100644 --- a/Libraries/NativeAnimation/React-RCTAnimation.podspec +++ b/Libraries/NativeAnimation/React-RCTAnimation.podspec @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "{Drivers/*,Nodes/*,*}.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTAnimation" s.dependency "React-Core", version end diff --git a/Libraries/Network/RCTNetworkTask.m b/Libraries/Network/RCTNetworkTask.m index 65be2871cc7448..ed87ecb268972f 100644 --- a/Libraries/Network/RCTNetworkTask.m +++ b/Libraries/Network/RCTNetworkTask.m @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#import "RCTNetworkTask.h" #import -#import #import @implementation RCTNetworkTask diff --git a/Libraries/Network/RCTNetworking.h b/Libraries/Network/RCTNetworking.h index 8a4dc1221e466a..9cf873a6b4dcb6 100644 --- a/Libraries/Network/RCTNetworking.h +++ b/Libraries/Network/RCTNetworking.h @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +#import "RCTNetworkTask.h" #import -#import #import @protocol RCTNetworkingRequestHandler diff --git a/Libraries/Network/RCTNetworking.mm b/Libraries/Network/RCTNetworking.mm index a17d0d3de56d56..fc060b25fa011f 100644 --- a/Libraries/Network/RCTNetworking.mm +++ b/Libraries/Network/RCTNetworking.mm @@ -12,8 +12,8 @@ #import #import #import -#import -#import +#import "RCTNetworkTask.h" +#import "RCTNetworking.h" #import #import "RCTHTTPRequestHandler.h" diff --git a/Libraries/Network/React-RCTNetwork.podspec b/Libraries/Network/React-RCTNetwork.podspec index 17797985e7c641..90eda7f3789147 100644 --- a/Libraries/Network/React-RCTNetwork.podspec +++ b/Libraries/Network/React-RCTNetwork.podspec @@ -28,7 +28,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m,mm}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTNetwork" s.dependency "React-Core", version end diff --git a/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec b/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec index da20c0e2f6422d..719dabaaeeb7f9 100644 --- a/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +++ b/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTPushNotification" s.dependency "React-Core", version end diff --git a/Libraries/Settings/React-RCTSettings.podspec b/Libraries/Settings/React-RCTSettings.podspec index 05463e4b714777..f3d6caf81b6f25 100644 --- a/Libraries/Settings/React-RCTSettings.podspec +++ b/Libraries/Settings/React-RCTSettings.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTSettings" s.dependency "React-Core", version end diff --git a/Libraries/Text/React-RCTText.podspec b/Libraries/Text/React-RCTText.podspec index 23072496b6c85e..9beba15a820bd8 100644 --- a/Libraries/Text/React-RCTText.podspec +++ b/Libraries/Text/React-RCTText.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "**/*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTText" s.dependency "React-Core", version end diff --git a/Libraries/Vibration/React-RCTVibration.podspec b/Libraries/Vibration/React-RCTVibration.podspec index e4df901ac533df..81190e6247b546 100644 --- a/Libraries/Vibration/React-RCTVibration.podspec +++ b/Libraries/Vibration/React-RCTVibration.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTVibration" s.dependency "React-Core", version end diff --git a/Libraries/WebSocket/React-RCTWebSocket.podspec b/Libraries/WebSocket/React-RCTWebSocket.podspec index 8f2ec71cefabf1..e28fe3bd0a9fec 100644 --- a/Libraries/WebSocket/React-RCTWebSocket.podspec +++ b/Libraries/WebSocket/React-RCTWebSocket.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" - s.header_dir = "React" + s.header_dir = "RCTWebSocket" s.dependency "React-Core", version end diff --git a/RNTester/RCTTest/React-RCTTest.podspec b/RNTester/RCTTest/React-RCTTest.podspec index 400e0c8481a26c..c4404a5c0e10d3 100644 --- a/RNTester/RCTTest/React-RCTTest.podspec +++ b/RNTester/RCTTest/React-RCTTest.podspec @@ -29,7 +29,7 @@ Pod::Spec.new do |s| s.source_files = "**/*.{h,m}" s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs" s.framework = "XCTest" - s.header_dir = "React" + s.header_dir = "RCTTest" s.dependency "React-Core", version end diff --git a/React/DevSupport/RCTInspectorDevServerHelper.h b/React/DevSupport/RCTInspectorDevServerHelper.h index c718dfd3b55e77..b0e246543db034 100644 --- a/React/DevSupport/RCTInspectorDevServerHelper.h +++ b/React/DevSupport/RCTInspectorDevServerHelper.h @@ -7,7 +7,7 @@ #import #import -#import +#import "RCTInspectorPackagerConnection.h" #if RCT_DEV diff --git a/React/DevSupport/RCTPackagerClient.m b/React/DevSupport/RCTPackagerClient.m index 66c086f39183f8..e27a41587c8b72 100644 --- a/React/DevSupport/RCTPackagerClient.m +++ b/React/DevSupport/RCTPackagerClient.m @@ -8,7 +8,7 @@ #import "RCTPackagerClient.h" #import -#import +#import #import #if RCT_DEV // Only supported in dev mode diff --git a/React/DevSupport/RCTPackagerConnection.mm b/React/DevSupport/RCTPackagerConnection.mm index 6df2ad31f27bca..ac89acd7af588e 100644 --- a/React/DevSupport/RCTPackagerConnection.mm +++ b/React/DevSupport/RCTPackagerConnection.mm @@ -17,9 +17,9 @@ #import #import #import -#import -#import -#import +#import "RCTPackagerClient.h" +#import +#import #import #if RCT_DEV diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 17f4491a7c582a..38aa64587cdef0 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -18,7 +18,7 @@ #import #import #import -#import +#import #import #import #import diff --git a/React/React-DevSupport.podspec b/React/React-DevSupport.podspec index 0f9405fb942851..3638a516ee6c3a 100644 --- a/React/React-DevSupport.podspec +++ b/React/React-DevSupport.podspec @@ -28,8 +28,9 @@ Pod::Spec.new do |s| s.source = source s.source_files = "DevSupport/*", "Inspector/*" - s.header_dir = "React" + s.header_dir = "DevSupport" s.dependency "React-Core", version + s.dependency "React-jsinspector", version s.dependency "React-RCTWebSocket", version end diff --git a/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm b/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm index 148b95fe1663ce..6833a84e6a4741 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm +++ b/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm @@ -7,7 +7,7 @@ #include "ImageManager.h" -#import +#import #import #import "RCTImageManager.h" diff --git a/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm b/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm index c319cd30d56a51..70c80cd30d80fd 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm +++ b/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm @@ -10,7 +10,7 @@ #import #import -#import +#import #import #import diff --git a/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h b/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h index 2a4b6f0f53e3d9..29eeca95560471 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +++ b/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h @@ -7,7 +7,7 @@ #import -#import +#import #import using namespace facebook::react; diff --git a/ReactCommon/jscallinvoker/React-jscallinvoker.podspec b/ReactCommon/jscallinvoker/React-jscallinvoker.podspec index 335e59929b82fd..b15a7793a17183 100644 --- a/ReactCommon/jscallinvoker/React-jscallinvoker.podspec +++ b/ReactCommon/jscallinvoker/React-jscallinvoker.podspec @@ -32,7 +32,7 @@ Pod::Spec.new do |s| s.source = source s.source_files = "jsireact/*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.header_dir = "jsireact" + s.header_dir = "jscallinvoker" s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.dependency "React-cxxreact", version diff --git a/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.cpp b/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.cpp index ed44cf84c3c45a..bd58ddc0c08ac7 100644 --- a/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.cpp +++ b/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.cpp @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -#include +#include "BridgeJSCallInvoker.h" #include namespace facebook { diff --git a/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.h b/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.h index fa21c2a74d7e45..dd8ef34b6aab9e 100644 --- a/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.h +++ b/ReactCommon/jscallinvoker/jsireact/BridgeJSCallInvoker.h @@ -10,7 +10,7 @@ #include #include -#include +#include "JSCallInvoker.h" namespace facebook { namespace react { diff --git a/ReactCommon/turbomodule/core/React-turbomodule-core.podspec b/ReactCommon/turbomodule/core/React-turbomodule-core.podspec index 6f0402d0f7e042..381f019ed9ebbd 100644 --- a/ReactCommon/turbomodule/core/React-turbomodule-core.podspec +++ b/ReactCommon/turbomodule/core/React-turbomodule-core.podspec @@ -32,8 +32,8 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.header_dir = "jsireact" s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } + s.header_dir = "turbomodule" s.xcconfig = { "OTHER_CFLAGS" => "$(inherited) -DRN_TURBO_MODULE_ENABLED" } s.dependency "React-Core", version @@ -44,6 +44,5 @@ Pod::Spec.new do |s| s.subspec "core-ios" do |ss| ss.source_files = "platform/ios/*.{mm,cpp,h}" - ss.header_dir = "jsireact" end end diff --git a/ReactCommon/turbomodule/core/TurboCxxModule.cpp b/ReactCommon/turbomodule/core/TurboCxxModule.cpp index 779fdeb08b161b..96c025168c7eaf 100644 --- a/ReactCommon/turbomodule/core/TurboCxxModule.cpp +++ b/ReactCommon/turbomodule/core/TurboCxxModule.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include "TurboModuleUtils.h" using namespace facebook; using namespace facebook::xplat::module; diff --git a/ReactCommon/turbomodule/core/TurboModule.h b/ReactCommon/turbomodule/core/TurboModule.h index 54a39fd76218bd..778ff383452593 100644 --- a/ReactCommon/turbomodule/core/TurboModule.h +++ b/ReactCommon/turbomodule/core/TurboModule.h @@ -12,7 +12,7 @@ #include -#include +#include namespace facebook { namespace react { diff --git a/ReactCommon/turbomodule/core/TurboModuleBinding.cpp b/ReactCommon/turbomodule/core/TurboModuleBinding.cpp index 5b370eede9ae6d..c602d506bd8b46 100644 --- a/ReactCommon/turbomodule/core/TurboModuleBinding.cpp +++ b/ReactCommon/turbomodule/core/TurboModuleBinding.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include "LongLivedObject.h" using namespace facebook; diff --git a/ReactCommon/turbomodule/core/TurboModuleBinding.h b/ReactCommon/turbomodule/core/TurboModuleBinding.h index 6195dcf39adccb..313af5113bdb23 100644 --- a/ReactCommon/turbomodule/core/TurboModuleBinding.h +++ b/ReactCommon/turbomodule/core/TurboModuleBinding.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace facebook { namespace react { diff --git a/ReactCommon/turbomodule/core/TurboModuleUtils.h b/ReactCommon/turbomodule/core/TurboModuleUtils.h index 61615ac77132ad..d94086f0d01bd5 100644 --- a/ReactCommon/turbomodule/core/TurboModuleUtils.h +++ b/ReactCommon/turbomodule/core/TurboModuleUtils.h @@ -11,7 +11,7 @@ #include -#include +#include using namespace facebook; diff --git a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h index ab0464ac85707d..7d2ec24009f57d 100644 --- a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h +++ b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.h @@ -13,8 +13,8 @@ #import #import #import -#import -#import +#import +#import "TurboModule.h" #import #import diff --git a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.mm b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.mm index ce6c7616788173..bd5315a0fe12dc 100644 --- a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.mm +++ b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModule.mm @@ -16,10 +16,10 @@ #import #import #import -#import -#import -#import -#import +#import +#import "LongLivedObject.h" +#import "TurboModule.h" +#import "TurboModuleUtils.h" #import #import diff --git a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm index 02565b28945b30..edbec7b5173d3c 100644 --- a/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm +++ b/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm @@ -16,9 +16,9 @@ #import #import #import -#import -#import -#import +#import +#import "TurboCxxModule.h" +#import "TurboModuleBinding.h" using namespace facebook; diff --git a/ReactCommon/turbomodule/samples/NativeSampleTurboCxxModuleSpecJSI.h b/ReactCommon/turbomodule/samples/NativeSampleTurboCxxModuleSpecJSI.h index a10fcf6cca1569..b19d4321dd5c66 100644 --- a/ReactCommon/turbomodule/samples/NativeSampleTurboCxxModuleSpecJSI.h +++ b/ReactCommon/turbomodule/samples/NativeSampleTurboCxxModuleSpecJSI.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace facebook { namespace react { diff --git a/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec b/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec index 7f2f8256eef7ba..1a57bc5dea0b38 100644 --- a/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec +++ b/ReactCommon/turbomodule/samples/React-turbomodule-samples.podspec @@ -32,8 +32,8 @@ Pod::Spec.new do |s| s.source = source s.source_files = "*.{cpp,h}" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags - s.header_dir = "jsireact" s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } + s.header_dir = "turbomodule-samples" s.xcconfig = { "OTHER_CFLAGS" => "$(inherited) -DRN_TURBO_MODULE_ENABLED" } s.dependency "React-Core", version @@ -42,9 +42,10 @@ Pod::Spec.new do |s| s.dependency "React-turbomodule-core", version s.dependency "Folly", folly_version s.dependency "DoubleConversion" + s.dependency "glog" s.subspec "samples-ios" do |ss| ss.source_files = "platform/ios/*.{mm,cpp,h}" - ss.header_dir = "jsireact" + ss.header_dir = "turbomodule-samples" end end diff --git a/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp b/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp index 4062e05ed7e65d..2b634bd6eefaa3 100644 --- a/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp +++ b/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp @@ -7,7 +7,7 @@ #import "SampleTurboCxxModule.h" -#import +#import using namespace facebook; diff --git a/ReactCommon/turbomodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h b/ReactCommon/turbomodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h index a3a1c589c8ccb2..d65bf12e056f01 100644 --- a/ReactCommon/turbomodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h +++ b/ReactCommon/turbomodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h @@ -14,7 +14,7 @@ #import #ifdef RN_TURBO_MODULE_ENABLED -#import +#import #endif /** diff --git a/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.h b/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.h index 5987d53cd44c4c..c19f796de824b2 100644 --- a/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.h +++ b/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.h @@ -8,7 +8,7 @@ #pragma once #import -#import +#import /** * Sample backward-compatible RCTCxxModule-based module. diff --git a/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.mm b/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.mm index 873661c9779ec9..d0454872649f90 100644 --- a/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.mm +++ b/ReactCommon/turbomodule/samples/platform/ios/RCTSampleTurboCxxModule.mm @@ -8,7 +8,7 @@ #import "RCTSampleTurboCxxModule.h" #import -#import +#import "SampleTurboCxxModule.h" #import "SampleTurboCxxModuleLegacyImpl.h" using namespace facebook; From 6d3c751a9cd6553eabee17a752239f187e21362e Mon Sep 17 00:00:00 2001 From: James Treanor Date: Tue, 25 Jun 2019 10:38:23 +0100 Subject: [PATCH 5/8] React-Core.podspec: Default Cxx headers private to avoid C++ import errors --- React/React-Core.podspec | 13 ++++++++++++- React/React-RCTFabric.podspec | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/React/React-Core.podspec b/React/React-Core.podspec index d687b2000d94d9..b8560129891d5f 100644 --- a/React/React-Core.podspec +++ b/React/React-Core.podspec @@ -40,12 +40,23 @@ Pod::Spec.new do |s| "Views/RCTPicker*", "Views/RCTRefreshControl*", "Views/RCTSlider*", - "Views/RCTSwitch*", + "Views/RCTSwitch*" + s.private_header_files = "Cxx*/*.h" s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags s.header_dir = "React" s.framework = "JavaScriptCore" s.library = "stdc++" s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" } + s.default_subspec = "Default" + + s.subspec "Default" do |ss| + # no-op + end + + s.subspec "CxxBridge" do |ss| + # Make the C++ headers visible if they are needed + ss.public_header_files = "**/*.{h}" + end s.dependency "Folly", folly_version s.dependency "React-cxxreact", version diff --git a/React/React-RCTFabric.podspec b/React/React-RCTFabric.podspec index 04d3ffc668bf66..1328360249f3f4 100644 --- a/React/React-RCTFabric.podspec +++ b/React/React-RCTFabric.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/Folly\"", "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags } - s.dependency "React-Core", version + s.dependency "React-Core/CxxBridge", version s.dependency "React-Fabric", version s.dependency "React-RCTImage", version s.dependency "Folly/Fabric", folly_version From 7ab5c3437d21630da1e37df484be1da756e9788d Mon Sep 17 00:00:00 2001 From: James Treanor Date: Tue, 25 Jun 2019 13:18:33 +0100 Subject: [PATCH 6/8] Fix import errors with __has_include --- Libraries/Blob/RCTBlobManager.mm | 14 ++++++++++++-- Libraries/Image/RCTImageCache.m | 7 ++++++- Libraries/Image/RCTImageLoader.m | 7 ++++++- .../RNTesterUnitTests/RCTAnimationUtilsTests.m | 4 ++++ RNTester/RNTesterUnitTests/RCTBlobManagerTests.m | 4 ++++ .../RCTNativeAnimatedNodesManagerTests.m | 8 +++++++- React/DevSupport/RCTPackagerClient.m | 7 ++++++- React/DevSupport/RCTPackagerConnection.mm | 8 +++++++- React/Fabric/RCTSurfacePresenter.mm | 7 ++++++- .../imagemanager/platform/ios/ImageManager.mm | 7 ++++++- .../imagemanager/platform/ios/RCTImageManager.mm | 7 ++++++- .../platform/ios/RCTImagePrimitivesConversions.h | 7 ++++++- 12 files changed, 76 insertions(+), 11 deletions(-) diff --git a/Libraries/Blob/RCTBlobManager.mm b/Libraries/Blob/RCTBlobManager.mm index 08e308eee6fd6a..cafddb1a3d3e15 100755 --- a/Libraries/Blob/RCTBlobManager.mm +++ b/Libraries/Blob/RCTBlobManager.mm @@ -10,11 +10,21 @@ #import #import -#import #import -#import #import "RCTBlobCollector.h" +#if __has_include() +#import +#else +#import +#endif + +#if __has_include() +#import +#else +#import +#endif + static NSString *const kBlobURIScheme = @"blob"; @interface RCTBlobManager () diff --git a/Libraries/Image/RCTImageCache.m b/Libraries/Image/RCTImageCache.m index 5d4a9a06717fe5..f4d533606ff8fd 100644 --- a/Libraries/Image/RCTImageCache.m +++ b/Libraries/Image/RCTImageCache.m @@ -12,10 +12,15 @@ #import #import -#import #import #import "RCTResizeMode.h" +#if __has_include() +#import +#else +#import +#endif + #import "RCTImageUtils.h" static const NSUInteger RCTMaxCachableDecodedImageSizeInBytes = 2097152; // 2 MB diff --git a/Libraries/Image/RCTImageLoader.m b/Libraries/Image/RCTImageLoader.m index b9c8e9d64de681..87a84ab9941147 100644 --- a/Libraries/Image/RCTImageLoader.m +++ b/Libraries/Image/RCTImageLoader.m @@ -14,9 +14,14 @@ #import #import "RCTImageLoader.h" #import -#import #import +#if __has_include() +#import +#else +#import +#endif + #import "RCTImageCache.h" #import "RCTImageUtils.h" diff --git a/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m b/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m index dc40bd1f1d8202..d93cda2fe75a20 100644 --- a/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m +++ b/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m @@ -8,7 +8,11 @@ #import +#if __has_include() #import +#else +#import +#endif @interface RCTAnimationUtilsTests : XCTestCase diff --git a/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m b/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m index 2b0f5eb754b39a..7f6716cf58d8aa 100644 --- a/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m +++ b/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m @@ -8,7 +8,11 @@ #import +#if __has_include() +#import +#else #import +#endif @interface RCTBlobManagerTests : XCTestCase diff --git a/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m b/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m index aa2244910d84d7..dd547b3ed7553d 100644 --- a/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m +++ b/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m @@ -10,9 +10,15 @@ #import +#import + +#if __has_include() +#import +#import +#else #import #import -#import +#endif static const NSTimeInterval FRAME_LENGTH = 1.0 / 60.0; diff --git a/React/DevSupport/RCTPackagerClient.m b/React/DevSupport/RCTPackagerClient.m index e27a41587c8b72..36c2fc24868ae4 100644 --- a/React/DevSupport/RCTPackagerClient.m +++ b/React/DevSupport/RCTPackagerClient.m @@ -8,9 +8,14 @@ #import "RCTPackagerClient.h" #import -#import #import +#if __has_include() +#import +#else +#import +#endif + #if RCT_DEV // Only supported in dev mode const int RCT_PACKAGER_CLIENT_PROTOCOL_VERSION = 2; diff --git a/React/DevSupport/RCTPackagerConnection.mm b/React/DevSupport/RCTPackagerConnection.mm index ac89acd7af588e..3e47b16c7c92f6 100644 --- a/React/DevSupport/RCTPackagerConnection.mm +++ b/React/DevSupport/RCTPackagerConnection.mm @@ -18,9 +18,15 @@ #import #import #import "RCTPackagerClient.h" +#import + +#if __has_include() +#import +#import +#else #import #import -#import +#endif #if RCT_DEV @interface RCTPackagerConnection () diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 38aa64587cdef0..44640cf11ed3fb 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -18,7 +18,6 @@ #import #import #import -#import #import #import #import @@ -27,6 +26,12 @@ #import #import +#if __has_include() +#import +#else +#import +#endif + #import #import #import diff --git a/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm b/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm index 6833a84e6a4741..1387588b715a66 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm +++ b/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm @@ -7,9 +7,14 @@ #include "ImageManager.h" -#import #import +#if __has_include() +#import +#else +#import +#endif + #import "RCTImageManager.h" namespace facebook { diff --git a/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm b/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm index 70c80cd30d80fd..da77a204c554cb 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm +++ b/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm @@ -10,10 +10,15 @@ #import #import -#import #import #import +#if __has_include() +#import +#else +#import +#endif + #import "RCTImagePrimitivesConversions.h" using namespace facebook::react; diff --git a/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h b/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h index 29eeca95560471..09038ad67f53ef 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +++ b/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h @@ -7,9 +7,14 @@ #import -#import #import +#if __has_include() +#import +#else +#import +#endif + using namespace facebook::react; inline static RCTResizeMode RCTResizeModeFromImageResizeMode( From 09e56c92c8573976dba9e0ae55b04858a7842698 Mon Sep 17 00:00:00 2001 From: James Treanor Date: Tue, 25 Jun 2019 15:57:55 +0100 Subject: [PATCH 7/8] Fix RCTImageUtils build in RNTester project --- Libraries/Image/RCTImage.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/Image/RCTImage.xcodeproj/project.pbxproj b/Libraries/Image/RCTImage.xcodeproj/project.pbxproj index 30fbcdf83b894a..2e0bfbbbe1c9a2 100644 --- a/Libraries/Image/RCTImage.xcodeproj/project.pbxproj +++ b/Libraries/Image/RCTImage.xcodeproj/project.pbxproj @@ -13,6 +13,8 @@ 139A38841C4D587C00862840 /* RCTResizeMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 139A38831C4D587C00862840 /* RCTResizeMode.m */; }; 13EF7F7F1BC825B1003F47DD /* RCTLocalAssetImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 13EF7F7E1BC825B1003F47DD /* RCTLocalAssetImageLoader.m */; }; 143879381AAD32A300F088A5 /* RCTImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 143879371AAD32A300F088A5 /* RCTImageLoader.m */; }; + 1ADE600C22C26D790062EAE9 /* RCTResizeMode.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D5FA63E1DE4B44A0058FD77 /* RCTResizeMode.h */; }; + 1ADE601022C26DB60062EAE9 /* RCTResizeMode.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3D5FA63E1DE4B44A0058FD77 /* RCTResizeMode.h */; }; 2D3B5F1A1D9B0D0400451313 /* RCTImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CCD34C261D4B8FE900268922 /* RCTImageCache.m */; }; 2D3B5F1B1D9B0D0700451313 /* RCTImageBlurUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = EEF314711C9B0DD30049118E /* RCTImageBlurUtils.m */; }; 2D3B5F1C1D9B0D1300451313 /* RCTResizeMode.m in Sources */ = {isa = PBXBuildFile; fileRef = 139A38831C4D587C00862840 /* RCTResizeMode.m */; }; @@ -70,6 +72,7 @@ dstPath = include/RCTImage; dstSubfolderSpec = 16; files = ( + 1ADE600C22C26D790062EAE9 /* RCTResizeMode.h in Copy Headers */, 3D302E181DF8228100D6DDAE /* RCTImageUtils.h in Copy Headers */, ); name = "Copy Headers"; @@ -81,6 +84,7 @@ dstPath = include/RCTImage; dstSubfolderSpec = 16; files = ( + 1ADE601022C26DB60062EAE9 /* RCTResizeMode.h in Copy Headers */, 3D302F211DF8269200D6DDAE /* RCTImageUtils.h in Copy Headers */, ); name = "Copy Headers"; From 9ad7fc78733c53f5583a48a240f6850d23913a1c Mon Sep 17 00:00:00 2001 From: James Treanor Date: Tue, 25 Jun 2019 16:30:10 +0100 Subject: [PATCH 8/8] Remove redundant __has_include statements --- RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m | 4 ---- RNTester/RNTesterUnitTests/RCTBlobManagerTests.m | 4 ---- .../RCTNativeAnimatedNodesManagerTests.m | 8 +------- React/Fabric/RCTSurfacePresenter.mm | 7 +------ .../fabric/imagemanager/platform/ios/ImageManager.mm | 7 +------ .../fabric/imagemanager/platform/ios/RCTImageManager.mm | 7 +------ .../platform/ios/RCTImagePrimitivesConversions.h | 7 +------ 7 files changed, 5 insertions(+), 39 deletions(-) diff --git a/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m b/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m index d93cda2fe75a20..dc40bd1f1d8202 100644 --- a/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m +++ b/RNTester/RNTesterUnitTests/RCTAnimationUtilsTests.m @@ -8,11 +8,7 @@ #import -#if __has_include() #import -#else -#import -#endif @interface RCTAnimationUtilsTests : XCTestCase diff --git a/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m b/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m index 7f6716cf58d8aa..2b0f5eb754b39a 100644 --- a/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m +++ b/RNTester/RNTesterUnitTests/RCTBlobManagerTests.m @@ -8,11 +8,7 @@ #import -#if __has_include() -#import -#else #import -#endif @interface RCTBlobManagerTests : XCTestCase diff --git a/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m b/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m index dd547b3ed7553d..aa2244910d84d7 100644 --- a/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m +++ b/RNTester/RNTesterUnitTests/RCTNativeAnimatedNodesManagerTests.m @@ -10,15 +10,9 @@ #import -#import - -#if __has_include() -#import -#import -#else #import #import -#endif +#import static const NSTimeInterval FRAME_LENGTH = 1.0 / 60.0; diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 44640cf11ed3fb..38aa64587cdef0 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -18,6 +18,7 @@ #import #import #import +#import #import #import #import @@ -26,12 +27,6 @@ #import #import -#if __has_include() -#import -#else -#import -#endif - #import #import #import diff --git a/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm b/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm index 1387588b715a66..6833a84e6a4741 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm +++ b/ReactCommon/fabric/imagemanager/platform/ios/ImageManager.mm @@ -7,13 +7,8 @@ #include "ImageManager.h" -#import - -#if __has_include() -#import -#else #import -#endif +#import #import "RCTImageManager.h" diff --git a/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm b/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm index da77a204c554cb..70c80cd30d80fd 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm +++ b/ReactCommon/fabric/imagemanager/platform/ios/RCTImageManager.mm @@ -10,15 +10,10 @@ #import #import +#import #import #import -#if __has_include() -#import -#else -#import -#endif - #import "RCTImagePrimitivesConversions.h" using namespace facebook::react; diff --git a/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h b/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h index 09038ad67f53ef..29eeca95560471 100644 --- a/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +++ b/ReactCommon/fabric/imagemanager/platform/ios/RCTImagePrimitivesConversions.h @@ -7,13 +7,8 @@ #import -#import - -#if __has_include() -#import -#else #import -#endif +#import using namespace facebook::react;