Skip to content

Commit 60cef85

Browse files
tido64facebook-github-bot
authored andcommitted
fix(ios): fix Time.h patch not being applied (#32961)
Summary: The path to `Time.h` is currently hard-coded and does not take into consideration the `--project-directory` flag when running `pod install`. ## Changelog [iOS] [Fixed] - Fix `Time.h` patch not being applied when running `pod install --project-directory=ios` Pull Request resolved: #32961 Test Plan: ``` git clone https://github.com/microsoft/react-native-test-app.git cd react-native-test-app npm run set-react-version main yarn cd example pod install --project-directory=ios ../scripts/xcodebuild.sh ios/Example.xcworkspace build ``` Reviewed By: christophpurrer Differential Revision: D33748789 Pulled By: lunaleaps fbshipit-source-id: b125734eba30e552ae139e7ecd4e634c8fa1bcd7
1 parent c48e5ac commit 60cef85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/react_native_pods.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -646,5 +646,6 @@ def __apply_Xcode_12_5_M1_post_install_workaround(installer)
646646
# "Time.h:52:17: error: typedef redefinition with different types"
647647
# We need to make a patch to RCT-Folly - remove the `__IPHONE_OS_VERSION_MIN_REQUIRED` check.
648648
# See https://github.com/facebook/flipper/issues/834 for more details.
649-
`sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' Pods/RCT-Folly/folly/portability/Time.h`
649+
time_header = "#{Pod::Config.instance.installation_root.to_s}/Pods/RCT-Folly/folly/portability/Time.h"
650+
`sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' #{time_header}`
650651
end

0 commit comments

Comments
 (0)