lib/cuesmash/ios_compiler.rb in cuesmash-0.4.1 vs lib/cuesmash/ios_compiler.rb in cuesmash-0.5.0

- old
+ new

@@ -9,15 +9,16 @@ class IosCompiler < Compiler attr_accessor :scheme attr_accessor :tmp_dir attr_accessor :build_configuration - def initialize(scheme:, tmp_dir:, build_configuration:, device: nil) + def initialize(scheme:, tmp_dir:, build_configuration:, device: nil, device_name: nil) @scheme = scheme @tmp_dir = tmp_dir @build_configuration = build_configuration @device = device + @device_name = device_name end # # Generate the string to be used as the xcode build command # using the scheme ivar @@ -29,10 +30,10 @@ xcode_command << "-scheme '#{@scheme}' " xcode_command << "-derivedDataPath #{@tmp_dir.shellescape} " xcode_command << "-configuration #{@build_configuration} " xcode_command << "OBJROOT=#{@tmp_dir.shellescape} " xcode_command << "SYMROOT=#{@tmp_dir.shellescape} " - xcode_command << '-sdk iphonesimulator ' if @device.nil? + xcode_command << "-destination 'platform=iOS Simulator,name=#{@device_name}' " if @device.nil? xcode_command << 'build ' xcode_command << '| bundle exec xcpretty -c' Logger.info "xcode_command == #{xcode_command}" xcode_command