Method: RunLoop::Core.default_simulator

Defined in:
lib/run_loop/core.rb

.default_simulator(xcode = RunLoop::Xcode.new) ⇒ Object

Returns the a default simulator to target. This default needs to be one that installed by default in the current Xcode version.

For historical reasons, the most recent non-64b SDK should be used.

Parameters:



486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
# File 'lib/run_loop/core.rb', line 486

def self.default_simulator(xcode=RunLoop::Xcode.new)
  if xcode.is_a?(RunLoop::XCTools)
    if RunLoop::Environment.debug?
      RunLoop.deprecated('1.5.0',
                         %q(
RunLoop::XCTools has been replaced with RunLoop::Xcode.
Please update your sources to pass an instance of RunLoop::Xcode))
    end
    ensured_xcode = RunLoop::Xcode.new
  else
    ensured_xcode = xcode
  end

  if ensured_xcode.version_gte_71?
    'iPhone 6s (9.1)'
  elsif ensured_xcode.version_gte_7?
    'iPhone 5s (9.0)'
  elsif ensured_xcode.version_gte_64?
    'iPhone 5s (8.4 Simulator)'
  elsif ensured_xcode.version_gte_63?
    'iPhone 5s (8.3 Simulator)'
  elsif ensured_xcode.version_gte_62?
    'iPhone 5s (8.2 Simulator)'
  elsif ensured_xcode.version_gte_61?
    'iPhone 5s (8.1 Simulator)'
  elsif ensured_xcode.version_gte_6?
    'iPhone 5s (8.0 Simulator)'
  else
    'iPhone Retina (4-inch) - Simulator - iOS 7.1'
  end
end