From c121624233e5ad34eadce3b5329e10406061fa51 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 24 Jan 2022 20:02:00 +0100 Subject: [PATCH] fix(ios): fix `Time.h` patch not being applied The path to `Time.h` is currently hard-coded and does not take into consideration the `--project-directory` flag when running `pod install`. --- scripts/react_native_pods.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 8054154f80460f..da4ac876749030 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -646,5 +646,6 @@ def __apply_Xcode_12_5_M1_post_install_workaround(installer) # "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. - `sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' Pods/RCT-Folly/folly/portability/Time.h` + 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