Method: FastlaneCore::DeviceManager.runtime_build_os_versions

Defined in:
fastlane_core/lib/fastlane_core/device_manager.rb

.runtime_build_os_versionsObject



14
15
16
17
18
19
20
21
22
23
24
25
# File 'fastlane_core/lib/fastlane_core/device_manager.rb', line 14

def runtime_build_os_versions
  @runtime_build_os_versions ||= begin
    output, status = Open3.capture2('xcrun simctl list -j runtimes')
    raise status unless status.success?
    json = JSON.parse(output)
    json['runtimes'].map { |h| [h['buildversion'], h['version']] }.to_h
  rescue StandardError => e
    UI.error(e)
    UI.error('xcrun simctl CLI broken; cun `xcrun simctl list runtimes` and make sure it works')
    UI.user_error!('xcrun simctl not working')
  end
end