From 0ab8b40fd64ad86b4598293faa0b77e71fc9d349 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Sun, 17 Sep 2023 19:55:02 -0700 Subject: [PATCH] Remove Xcode 12.5 post install workaround (#39482) Summary: Now that we updated folly in https://github.com/facebook/react-native/commit/17154a661fe06ed25bf599f47bd4193eba011971, we should pick up https://github.com/facebook/folly/commit/4a8837f3226152c2106be366ecae3a228cde4f45 and probably don't need this post install phase anymore ## Changelog: [IOS] [REMOVED] - Remove Xcode 12.5 post install workaround Pull Request resolved: https://github.com/facebook/react-native/pull/39482 Test Plan: CI should pass Reviewed By: cipolleschi Differential Revision: D49328614 Pulled By: NickGerleman fbshipit-source-id: 05fa0b6d41d07ac552e2b536fbf3a732a31ba713 --- .../react-native/scripts/react_native_pods.rb | 20 ------------------- packages/react-native/template/ios/Podfile | 1 - packages/rn-tester/Podfile | 1 - 3 files changed, 22 deletions(-) diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index cab84e43eca047..6bded1d2838974 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -379,23 +379,3 @@ def use_react_native_codegen!(spec, options={}) :show_env_vars_in_log => true } end - -# This provides a post_install workaround for build issues related Xcode 12.5 and Apple Silicon machines. -# Call this in the app's main Podfile's post_install hook. -# See https://github.com/facebook/react-native/issues/31480#issuecomment-902912841 for more context. -# Actual fix was authored by https://github.com/mikehardy. -# New app template will call this for now until the underlying issue is resolved. -def __apply_Xcode_12_5_M1_post_install_workaround(installer) - # NOTE: This fix is still required due to RCT-Folly - # creating a function with a better name but keeping the - # previous for backward compatibility - __fix_double_definition_of_clockid_in_folly() -end - -def __fix_double_definition_of_clockid_in_folly() - # "Time.h:52:17: error: typedef redefinition with different types" - # We need to make a patch to RCT-Folly - remove the `__IPHONE_OS_VERSION_MIN_REQUIRED` check. - # See https://github.com/facebook/flipper/issues/834 for more details. - time_header = "#{Pod::Config.instance.installation_root.to_s}/Pods/RCT-Folly/folly/portability/Time.h" - `sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' '#{time_header}'` -end diff --git a/packages/react-native/template/ios/Podfile b/packages/react-native/template/ios/Podfile index 8a7176582a8408..a728ca27015914 100644 --- a/packages/react-native/template/ios/Podfile +++ b/packages/react-native/template/ios/Podfile @@ -51,6 +51,5 @@ target 'HelloWorld' do config[:reactNativePath], :mac_catalyst_enabled => false ) - __fix_double_definition_of_clockid_in_folly() end end diff --git a/packages/rn-tester/Podfile b/packages/rn-tester/Podfile index 443048d7b2dead..36f670df0d5e8d 100644 --- a/packages/rn-tester/Podfile +++ b/packages/rn-tester/Podfile @@ -87,5 +87,4 @@ end post_install do |installer| react_native_post_install(installer, @prefix_path, :mac_catalyst_enabled => false) - __fix_double_definition_of_clockid_in_folly() end