From 0cae4959b750ea051dcd04e4c9374e02b1de6e7a Mon Sep 17 00:00:00 2001 From: Roman Melnyk Date: Tue, 13 Sep 2022 04:14:04 -0700 Subject: [PATCH] #34610 Fix invalid range "t-5" in string transliteration [iOS] (#34636) Summary: Fix invalid range "t-5" in string transliteration [iOS] for M1 pod install issue. This should fix pod install error for M1 machines. ## Changelog [iOS] [Fixed] - Fix ios pod install error Pull Request resolved: https://github.com/facebook/react-native/pull/34636 Test Plan: Run pod install on M1 machine. Reviewed By: sammy-SC Differential Revision: D39423276 Pulled By: cipolleschi fbshipit-source-id: 4ec95af7103395792facba0f93fd8de05a3fe78d --- scripts/cocoapods/utils.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/cocoapods/utils.rb b/scripts/cocoapods/utils.rb index bc14b58378e27c..7b5cc32bb453c4 100644 --- a/scripts/cocoapods/utils.rb +++ b/scripts/cocoapods/utils.rb @@ -139,10 +139,12 @@ def self.fix_library_search_path(config) return end - # $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1) - # since the libraries there are only built for x86_64 and i386. - lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") - lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"") + if lib_search_paths.include?("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") || lib_search_paths.include?("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"") + # $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1) + # since the libraries there are only built for x86_64 and i386. + lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") + lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"") + end if !(lib_search_paths.include?("$(SDKROOT)/usr/lib/swift") || lib_search_paths.include?("\"$(SDKROOT)/usr/lib/swift\"")) # however, $(SDKROOT)/usr/lib/swift is required, at least if user is not running CocoaPods 1.11