From d1e500c3b19182897ccfb8abfe87e3f32dcacd3e Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Wed, 15 Feb 2023 04:17:06 -0800 Subject: [PATCH] Move ReactCommon's `.../nativemodule/xxx/platform/ios` files to `.../nativemodule/xxx/platform/ios/ReactCommon` Summary: To properly setup the Header Search Paths for `use_frameworks!`, we need to move the files that are in the `.../nativemodule/xxx/platform/ios` folder into the `.../nativemodule/xxx/platform/ios/ReactCommon` folder. We have two folders to migrate: `core` and `sample`. As a cleanup, `sample` should be extracted from the codebase and moved to RNTester or a library as it can be used as an example to add more examples in the codebase that we ship to our users. This mimic the same folder structure we have also in `cxx` and `android` ## Changelog [iOS][Changed] Moved the files from `.../nativemodule/xxx/platform/ios` to `.../nativemodule/xxx/platform/ios/ReactCommon` Reviewed By: cortinico Differential Revision: D43082851 fbshipit-source-id: 414426274d9a5ab20cc0e76cdada0c2977264b5f --- ReactCommon/react/nativemodule/core/BUCK | 4 +++- .../core/platform/ios/{ => ReactCommon}/RCTBlockGuard.h | 0 .../core/platform/ios/{ => ReactCommon}/RCTBlockGuard.mm | 0 .../core/platform/ios/{ => ReactCommon}/RCTTurboModule.h | 0 .../core/platform/ios/{ => ReactCommon}/RCTTurboModule.mm | 0 .../platform/ios/{ => ReactCommon}/RCTTurboModuleManager.h | 0 .../platform/ios/{ => ReactCommon}/RCTTurboModuleManager.mm | 0 ReactCommon/react/nativemodule/samples/BUCK | 4 +++- .../ios/{ => ReactCommon}/RCTNativeSampleTurboModuleSpec.h | 0 .../ios/{ => ReactCommon}/RCTNativeSampleTurboModuleSpec.mm | 0 .../platform/ios/{ => ReactCommon}/RCTSampleTurboCxxModule.h | 0 .../platform/ios/{ => ReactCommon}/RCTSampleTurboCxxModule.mm | 0 .../platform/ios/{ => ReactCommon}/RCTSampleTurboModule.h | 0 .../platform/ios/{ => ReactCommon}/RCTSampleTurboModule.mm | 0 .../ios/{ => ReactCommon}/SampleTurboCxxModuleLegacyImpl.cpp | 0 .../ios/{ => ReactCommon}/SampleTurboCxxModuleLegacyImpl.h | 0 16 files changed, 6 insertions(+), 2 deletions(-) rename ReactCommon/react/nativemodule/core/platform/ios/{ => ReactCommon}/RCTBlockGuard.h (100%) rename ReactCommon/react/nativemodule/core/platform/ios/{ => ReactCommon}/RCTBlockGuard.mm (100%) rename ReactCommon/react/nativemodule/core/platform/ios/{ => ReactCommon}/RCTTurboModule.h (100%) rename ReactCommon/react/nativemodule/core/platform/ios/{ => ReactCommon}/RCTTurboModule.mm (100%) rename ReactCommon/react/nativemodule/core/platform/ios/{ => ReactCommon}/RCTTurboModuleManager.h (100%) rename ReactCommon/react/nativemodule/core/platform/ios/{ => ReactCommon}/RCTTurboModuleManager.mm (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/RCTNativeSampleTurboModuleSpec.h (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/RCTNativeSampleTurboModuleSpec.mm (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/RCTSampleTurboCxxModule.h (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/RCTSampleTurboCxxModule.mm (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/RCTSampleTurboModule.h (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/RCTSampleTurboModule.mm (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/SampleTurboCxxModuleLegacyImpl.cpp (100%) rename ReactCommon/react/nativemodule/samples/platform/ios/{ => ReactCommon}/SampleTurboCxxModuleLegacyImpl.h (100%) diff --git a/ReactCommon/react/nativemodule/core/BUCK b/ReactCommon/react/nativemodule/core/BUCK index 9de875edcb..143dcb6183 100644 --- a/ReactCommon/react/nativemodule/core/BUCK +++ b/ReactCommon/react/nativemodule/core/BUCK @@ -1,5 +1,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "CXX", "FBJNI_TARGET", "get_objc_arc_preprocessor_flags", "get_preprocessor_flags_for_build_mode", "get_static_library_ios_flags", "react_native_target", "react_native_xplat_shared_library_target", "react_native_xplat_target", "rn_xplat_cxx_library", "subdir_glob") +oncall("react_native") + rn_xplat_cxx_library( name = "core", srcs = glob( @@ -43,7 +45,7 @@ rn_xplat_cxx_library( ], ios_exported_headers = subdir_glob( [ - ("platform/ios", "*.h"), + ("platform/ios/ReactCommon", "*.h"), ], prefix = "ReactCommon", ), diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTBlockGuard.h b/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTBlockGuard.h similarity index 100% rename from ReactCommon/react/nativemodule/core/platform/ios/RCTBlockGuard.h rename to ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTBlockGuard.h diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTBlockGuard.mm b/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTBlockGuard.mm similarity index 100% rename from ReactCommon/react/nativemodule/core/platform/ios/RCTBlockGuard.mm rename to ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTBlockGuard.mm diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.h b/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h similarity index 100% rename from ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.h rename to ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.h diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm b/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm similarity index 100% rename from ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModule.mm rename to ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.h b/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h similarity index 100% rename from ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.h rename to ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm b/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm similarity index 100% rename from ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm rename to ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm diff --git a/ReactCommon/react/nativemodule/samples/BUCK b/ReactCommon/react/nativemodule/samples/BUCK index 2285cf0264..ea1153fa91 100644 --- a/ReactCommon/react/nativemodule/samples/BUCK +++ b/ReactCommon/react/nativemodule/samples/BUCK @@ -1,5 +1,7 @@ load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "FBJNI_TARGET", "get_objc_arc_preprocessor_flags", "get_preprocessor_flags_for_build_mode", "get_static_library_ios_flags", "react_native_dep", "react_native_target", "react_native_xplat_target", "rn_android_library", "rn_xplat_cxx_library", "subdir_glob") +oncall("react_native") + rn_xplat_cxx_library( name = "samples", srcs = glob( @@ -44,7 +46,7 @@ rn_xplat_cxx_library( ], ios_exported_headers = subdir_glob( [ - ("platform/ios", "*.h"), + ("platform/ios/ReactCommon", "*.h"), ], prefix = "ReactCommon", ), diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.h rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.mm b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/RCTNativeSampleTurboModuleSpec.mm rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboCxxModule.h b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.h similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboCxxModule.h rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.h diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboCxxModule.mm b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.mm similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboCxxModule.mm rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboCxxModule.mm diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.h b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.h similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.h rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.h diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.mm b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/RCTSampleTurboModule.mm rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.cpp b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.cpp rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.cpp diff --git a/ReactCommon/react/nativemodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.h b/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h similarity index 100% rename from ReactCommon/react/nativemodule/samples/platform/ios/SampleTurboCxxModuleLegacyImpl.h rename to ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/SampleTurboCxxModuleLegacyImpl.h