Skip to content

Commit

Permalink
[iOS] Remove Xcode 12.5 post install workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Sep 15, 2023
1 parent 8d2af49 commit 3b39c1f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
20 changes: 0 additions & 20 deletions packages/react-native/scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion packages/react-native/template/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ target 'HelloWorld' do
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__fix_double_definition_of_clockid_in_folly()
end
end

0 comments on commit 3b39c1f

Please sign in to comment.