From 2ababdf68b42e23fc9dee34fd257e776de20564f Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Sat, 20 Nov 2021 16:37:07 +0100 Subject: [PATCH 1/2] Fix post_install_workaround downgrading development targets --- scripts/react_native_pods.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index fe68c38607dd6c..6e0b985d15b162 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -548,8 +548,12 @@ def __apply_Xcode_12_5_M1_post_install_workaround(installer) # The most reliable known workaround is to bump iOS deployment target to match react-native (iOS 11 now). installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' + # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 11.0 + should_upgrade = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].split('.')[0].to_i < 11 + if should_upgrade + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' end + end end # But... doing so caused another issue in Flipper: From 3919ce899599280757d81c63fd2e006d8d524765 Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Sat, 20 Nov 2021 21:26:41 +0100 Subject: [PATCH 2/2] Update the sed command to remove the version check --- scripts/react_native_pods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 6e0b985d15b162..7d9c0508ea1888 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -558,7 +558,7 @@ def __apply_Xcode_12_5_M1_post_install_workaround(installer) # But... doing so caused another issue in Flipper: # "Time.h:52:17: error: typedef redefinition with different types" - # We need to make a patch to RCT-Folly - set `__IPHONE_10_0` to our iOS target + 1. + # 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. - `sed -i -e $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h` + `sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' Pods/RCT-Folly/folly/portability/Time.h` end