b0VIM 8.2a+cjoshholtzJoshs-MacBook-Air.local~joshholtz/Developer/fastlane/fastlane/scan/lib/scan/detect_values.rbutf-8 3210#"! Utp9#<Y]9adDD9_J Y     F E }  K 0 { q p U T $ {zf^]DC-i}PO-,z)cN. sim_version = Gem::Version.new(s.os_version) simulators.select do |s| deployment_target_version = Gem::Version.new(deployment_target) def self.filter_simulators(simulators, operator = :greater_than_or_equal, deployment_target) end Scan.config[:derived_data_path] = default_path UI.verbose("Detected derived data path '#{default_path}'") default_path = File.expand_path("../../..", default_path) # We got 3 folders up to point to ".../DerivedData/app-[random_chars]/" # => /Users/.../Library/Developer/Xcode/DerivedData/app-bqrfaojicpsqnoglloisfftjhksc/Build/Products/Release-iphoneos default_path = Scan.project.build_settings(key: "BUILT_PRODUCTS_DIR") return unless Scan.config[:derived_data_path].to_s.empty? return unless Scan.project def self.default_derived_data end Scan.config[config_key] = config_value.map(&:to_s) config_value = config_value.split(',') unless config_value.kind_of?(Array) # Array type # from the command line, even though the ConfigItem is not defined as an # splitting on comma allows us to support comma-separated lists of values return if config_value.nil? config_value = Scan.config[config_key] def self.coerce_to_array_of_strings(config_key) end end UI.user_error!("Using a :custom_report_file_name with multiple :output_types (#{output_types}) will lead to unexpected results. Use :output_files instead.") if has_multiple_report_types && Scan.config[:custom_report_file_name] has_multiple_report_types = output_types && output_types.split(',').size > 1 output_types = Scan.config[:out if if Scan. def self.prevalidate end return config coerce_to_array_of_strings(:skip_test_configurations) coerce_to_array_of_strings(:only_test_configurations) coerce_to_array_of_strings(:skip_testing) coerce_to_array_of_strings(:only_testing) default_derived_data detect_destination end end detect_simulator(devices, 'tvOS', 'TVOS_DEPLOYMENT_TARGET', 'Apple TV 1080p', 'TV') elsif Scan.project.tvos? detect_simulator(devices, 'iOS', 'IPHONEOS_DEPLOYMENT_TARGET', 'iPhone 5s', nil) # An iPhone 5s is a reasonably small and useful default for tests if Scan.project.ios? elsif Scan.project detect_simulator(devices, '', '', '', nil) if devices.count > 0 devices = Scan.config[:devices] || Array(Scan.config[:device]) # important to use Array(nil) for when the value is nil end Scan.project.select_scheme end config.load_configuration_file(Scan.scanfile_name) unless File.expand_path(Scan.scanfile_name) == imported_path Dir.chdir(File.expand_path("..", Scan.project.path)) do imported_path = File.expand_path(Scan.scanfile_name) # Go into the project's folder, as there might be a Snapfile there Scan.project = FastlaneCore::Project.new(config) FastlaneCore::Project.detect_projects(config) if Scan.config[:package_path].nil? # Detect the project if not SPM package prevalidate config.load_configuration_file(Scan.scanfile_name) # First, try loading the Scanfile from the current directory config = Scan.config def self.set_additional_default_values # Returns the finished config object # This is needed as these are more complex default values class DetectValues # This class detects all kinds of default valuesmodule Scanrequire_relative 'module'require 'fastlane_core/project'require 'fastlane_core/device_manager'ad9rqW@f>21 Q " j F > =  K s F [ ) Wend end end return version version ||= 0 version ||= Scan.project.build_settings(key: deployment_target_key) if Scan.project version = Scan.config[:deployment_target_version] def self.get_deployment_target_version(deployment_target_key) # get deployment target version end end Scan.config[:destination] = min_xcode8? ? ["platform=macOS"] : ["platform=OS X"] elsif Scan.project && Scan.project.mac_app? Scan.config[:destination] = Scan.devices.map { |d| "platform=#{d.os_type} Simulator,id=#{d.udid}" } elsif Scan.devices && Scan.devices.count > 0 Scan.config[:destination] = ["platform=macOS,variant=Mac Catalyst"] if Scan.building_mac_catalyst_for_mac? # building up the destination now end return UI.important("because I trust you know what you're doing...") UI.important("Using your value '#{Scan.config[:destination]}' for now") UI.important("Instead use the other options available in `fastlane scan --help`") UI.important("It's not recommended to set the `destination` value directly") if Scan.config[:destination] def self.detect_destination end Helper.xcode_at_least?("8.0") def self.min_xcode8? end }.reject(&:nil?).first arr unless arr.empty? arr = x.call Scan.devices = [matches, default].lazy.reject(&:nil?).map { |x| # grab the first unempty evaluated array # Convert array to lazy enumerable (evaluate map only when needed) end end result UI.message("Found simulator \"#{result.first.name} (#{result.first.os_version})\"") if result.first ) .last || simulators.first .sort_by! { |sim| Gem::Version.new(sim.os_version) } .reverse # more efficient, because `simctl` prints higher versions first .select { |sim| sim.name == default_device_name } simulators result = Array( UI.error("Couldn't find any matching simulators for '#{devices}' - falling back to default simulator") if (devices || []).count > 0ad\ #}1zyE U B l k + d  ` X W \ [ sim_version = Gem::Version.new(s.os_version) simulators.select do |s| deployment_target_version = Gem::Version.new(deployment_target) def self.filter_simulators(simulators, operator = :greater_than_or_equal, deployment_target) end Scan.config[:derived_data_path] = default_path UI.verbose("Detected derived data path '#{default_path}'") default_path = File.expand_path("../../..", default_path) # We got 3 folders up to point to ".../DerivedData/app-[random_chars]/" # => /Users/.../Library/Developer/Xcode/DerivedData/app-bqrfaojicpsqnoglloisfftjhksc/Build/Products/Release-iphoneos default_path = Scan.project.build_settings(key: "BUILT_PRODUCTS_DIR") return unless Scan.config[:derived_data_path].to_s.empty? return unless Scan.project def self.default_derived_data end Scan.config[config_key] = config_value.map(&:to_s) config_value = config_value.split(',') unless config_value.kind_of?(Array) # Array type # from the command line, even though the ConfigItem is not defined as an # splitting on comma allows us to support comma-separated lists of values return if config_value.nil? config_value = Scan.config[config_key] def self.coerce_to_array_of_strings(config_key) end end UI.user_error!("Using a :custom_report_file_name with multiple :output_types (#{output_types}) will lead to unexpected results. Use :output_files instead.") if has_multiple_report_types && Scan.config[:custom_report_file_name] has_multiple_report_types = output_types && output_types.split(',').size > 1 output_types = Scan.config[:output_types]