From 0c8c95f4aefe1a9378f7108ac4d59f655ceb5d8d Mon Sep 17 00:00:00 2001 From: Kevin Gozali Date: Fri, 12 Jul 2019 14:24:55 -0700 Subject: [PATCH] iOS: Use RCTTypeSafety header namespace instead of React Summary: For better compatibility re: https://github.com/facebook/react-native/pull/25393, this target should just use `RCTTypeSafety` Reviewed By: PeteTheHeat Differential Revision: D16210888 fbshipit-source-id: 6a55d631453cc420909247a7d5a64379587225b7 --- .../FBReactNativeSpec.podspec | 2 +- .../FBReactNativeSpec/FBReactNativeSpec.h | 6 ++--- ...peSafety.podspec => RCTTypeSafety.podspec} | 4 ++-- RNTester/Podfile.lock | 22 +++++++++---------- scripts/autolink-ios.rb | 2 +- template/ios/Podfile | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) rename Libraries/TypeSafety/{React-TypeSafety.podspec => RCTTypeSafety.podspec} (95%) diff --git a/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec b/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec index 4283962ff56..fac55a923b6 100644 --- a/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec +++ b/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec @@ -41,7 +41,7 @@ Pod::Spec.new do |s| s.dependency "Folly", folly_version s.dependency "RCTRequired", version + s.dependency "RCTTypeSafety", version s.dependency "React-Core", version - s.dependency "React-TypeSafety", version s.dependency "React-turbomodule-core", version end diff --git a/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h b/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h index c9ee996106a..3eccee93c48 100644 --- a/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +++ b/Libraries/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h @@ -16,11 +16,11 @@ #endif #import #import +#import +#import #import -#import #import #import -#import #import #import #import @@ -1757,7 +1757,7 @@ namespace facebook { } // namespace react } // namespace facebook -#import +#import inline NSString *JS::NativeAlertManager::Args::title() const diff --git a/Libraries/TypeSafety/React-TypeSafety.podspec b/Libraries/TypeSafety/RCTTypeSafety.podspec similarity index 95% rename from Libraries/TypeSafety/React-TypeSafety.podspec rename to Libraries/TypeSafety/RCTTypeSafety.podspec index 11e74980ee4..0bd66ab18d6 100644 --- a/Libraries/TypeSafety/React-TypeSafety.podspec +++ b/Libraries/TypeSafety/RCTTypeSafety.podspec @@ -21,7 +21,7 @@ folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 folly_version = '2018.10.22.00' Pod::Spec.new do |s| - s.name = "React-TypeSafety" + s.name = "RCTTypeSafety" s.version = version s.summary = "-" # TODO s.homepage = "http://facebook.github.io/react-native/" @@ -31,7 +31,7 @@ Pod::Spec.new do |s| s.compiler_flags = folly_compiler_flags s.source = source s.source_files = "**/*.{c,h,m,mm,cpp}" - s.header_dir = "React" + s.header_dir = "RCTTypeSafety" s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", diff --git a/RNTester/Podfile.lock b/RNTester/Podfile.lock index 640fd355c72..e1667904c87 100644 --- a/RNTester/Podfile.lock +++ b/RNTester/Podfile.lock @@ -5,9 +5,9 @@ PODS: - FBReactNativeSpec (1000.0.0): - Folly (= 2018.10.22.00) - RCTRequired (= 1000.0.0) + - RCTTypeSafety (= 1000.0.0) - React-Core (= 1000.0.0) - React-turbomodule-core (= 1000.0.0) - - React-TypeSafety (= 1000.0.0) - Folly (2018.10.22.00): - boost-for-react-native - DoubleConversion @@ -19,6 +19,11 @@ PODS: - glog - glog (0.3.5) - RCTRequired (1000.0.0) + - RCTTypeSafety (1000.0.0): + - FBLazyVector (= 1000.0.0) + - Folly (= 2018.10.22.00) + - RCTRequired (= 1000.0.0) + - React-Core (= 1000.0.0) - React (1000.0.0): - React-Core (= 1000.0.0) - React-DevSupport (= 1000.0.0) @@ -145,11 +150,6 @@ PODS: - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) - React-turbomodule-core (= 1000.0.0) - - React-TypeSafety (1000.0.0): - - FBLazyVector (= 1000.0.0) - - Folly (= 2018.10.22.00) - - RCTRequired (= 1000.0.0) - - React-Core (= 1000.0.0) - yoga (1000.0.0.React) DEPENDENCIES: @@ -159,6 +159,7 @@ DEPENDENCIES: - Folly (from `../third-party-podspecs/Folly.podspec`) - glog (from `../third-party-podspecs/glog.podspec`) - RCTRequired (from `../Libraries/RCTRequired`) + - RCTTypeSafety (from `../Libraries/TypeSafety`) - React (from `../`) - React-ART (from `../Libraries/ART`) - React-Core (from `../React`) @@ -183,7 +184,6 @@ DEPENDENCIES: - React-RCTWebSocket (from `../Libraries/WebSocket`) - React-turbomodule-core (from `../ReactCommon/turbomodule/core`) - React-turbomodule-samples (from `../ReactCommon/turbomodule/samples`) - - React-TypeSafety (from `../Libraries/TypeSafety`) - yoga (from `../ReactCommon/yoga`) SPEC REPOS: @@ -203,6 +203,8 @@ EXTERNAL SOURCES: :podspec: "../third-party-podspecs/glog.podspec" RCTRequired: :path: "../Libraries/RCTRequired" + RCTTypeSafety: + :path: "../Libraries/TypeSafety" React: :path: "../" React-ART: @@ -251,8 +253,6 @@ EXTERNAL SOURCES: :path: "../ReactCommon/turbomodule/core" React-turbomodule-samples: :path: "../ReactCommon/turbomodule/samples" - React-TypeSafety: - :path: "../Libraries/TypeSafety" yoga: :path: "../ReactCommon/yoga" @@ -260,10 +260,11 @@ SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 FBLazyVector: 34431b7e61740bed29b082ff81500b0ffafaffa0 - FBReactNativeSpec: 27edbb3f472981ab270b7faa8cdbe058b9811593 + FBReactNativeSpec: 60bf4c6b7cd868b2878f2d3556e37ecfd5e51a17 Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 glog: 1f3da668190260b06b429bb211bfbee5cd790c28 RCTRequired: 33f3b89d2d82ef01c02b9b4f8146c43762e509d8 + RCTTypeSafety: 2b1cb2d92b779aa9a3522f67bd4f07e6b6d0797e React: 7c652b87c228731c51ab5764de68b6c17e6342be React-ART: 28f8815acbbc4816cec14866b59911a83eb780ed React-Core: b85f6553c4b2a31e7d71234c28b51bb928a00cbd @@ -288,7 +289,6 @@ SPEC CHECKSUMS: React-RCTWebSocket: cb5317e9a4adc37191660f819fb21d63433584ef React-turbomodule-core: 5cce62fb65bd0b19f249bc1c4c54b82b3cf9a749 React-turbomodule-samples: ef5c144b510530cb108d4bdb8615dc3943a802fd - React-TypeSafety: 1de5a1034398108f4ca866b68489734f8dbb4c44 yoga: b72aa5b3708cc93c5897f8297122d6eba1331e07 PODFILE CHECKSUM: 5ebd7e7531d9b6db21435251001600722f432414 diff --git a/scripts/autolink-ios.rb b/scripts/autolink-ios.rb index b1c14721175..9bdc7e72549 100644 --- a/scripts/autolink-ios.rb +++ b/scripts/autolink-ios.rb @@ -13,6 +13,7 @@ def use_react_native! (options={}) pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "#{prefix}/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "#{prefix}/Libraries/RCTRequired" + pod 'RCTTypeSafety', :path => "#{prefix}/Libraries/TypeSafety" pod 'React', :path => "#{prefix}/" pod 'React-Core', :path => "#{prefix}/React" pod 'React-CoreModules', :path => "#{prefix}/React/CoreModules" @@ -26,7 +27,6 @@ def use_react_native! (options={}) pod 'React-RCTText', :path => "#{prefix}/Libraries/Text" pod 'React-RCTVibration', :path => "#{prefix}/Libraries/Vibration" pod 'React-RCTWebSocket', :path => "#{prefix}/Libraries/WebSocket" - pod 'React-TypeSafety', :path => "#{prefix}/Libraries/TypeSafety" unless production pod 'React-DevSupport', :path => "#{prefix}/React" diff --git a/template/ios/Podfile b/template/ios/Podfile index 3216235617d..072b10ba5ad 100644 --- a/template/ios/Podfile +++ b/template/ios/Podfile @@ -6,6 +6,7 @@ target 'HelloWorld' do pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" + pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/' pod 'React-Core', :path => '../node_modules/react-native/React' pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' @@ -20,7 +21,6 @@ target 'HelloWorld' do pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket' - pod 'React-TypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jscallinvoker', :path => "../node_modules/react-native/ReactCommon/jscallinvoker"