From eaad4027c654edef431393b00e013cdfae6297b8 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Tue, 16 Jan 2024 11:09:06 +0300 Subject: [PATCH] use xcodes for Xcode version selection --- xcode/commonFastfile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/xcode/commonFastfile b/xcode/commonFastfile index e95320d..7afc9dc 100644 --- a/xcode/commonFastfile +++ b/xcode/commonFastfile @@ -160,25 +160,13 @@ private_lane :buildArchive do |options| lane_name = options[:lane_name] configuration = options[:configuration] xcodeproj_path = options[:xcodeproj_path] - xcode_version = options[:xcodeVersion] - cmd = 'system_profiler -json SPDeveloperToolsDataType' - cmd_result = `#{cmd}` - spdeveloperToolsDataType = JSON.parse(cmd_result)['SPDeveloperToolsDataType'] - sortedSPDeveloperToolsDataType = spdeveloperToolsDataType.sort_by { |hash| hash['spdevtools_version'].split(' ').first.to_i } # sort by increasing the version of xcode - default_xcode_version = sortedSPDeveloperToolsDataType.last['spdevtools_version'] # take the largest version in format: "13.0 (13A5212g)" - default_xcode_version_number = default_xcode_version.split(' ').first # take version number + xcodes(select_for_current_build_only: true) if configuration != "AppStore" # AppStore uses xcconfig choosen in Xcode set_xcconfig_for_configuration_of_project(lane_name, configuration, xcodeproj_path) end - if xcode_version.nil? - xcversion(version: default_xcode_version_number) - else - xcversion(version: xcode_version) - end - gym( clean: true, workspace: options[:workspace],