[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit error for destination without simulator #21911

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions fastlane_core/lib/fastlane_core/device_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ def discover_devices(usb_item, device_types, discovered_device_udids)
end

def latest_simulator_version_for_device(device)
simulators.select { |s| s.name == device }
.sort_by { |s| Gem::Version.create(s.os_version) }
.last
.os_version
latest_simulator = simulators.select { |s| s.name == device }
.sort_by { |s| Gem::Version.create(s.os_version) }
.last

UI.error("No simulator found for device: #{device}") unless latest_simulator

latest_simulator.os_version
end

# The code below works from Xcode 7 on
Expand Down