Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix lint in Xcode 7.2, it requires -destination
While `watchos` and `tvos` are fairly straightforward, I chose iPhone 4s
as destination for `ios` since it is seems like the most likely to
work with any version of Xcode at this point.
  • Loading branch information
neonichu authored and segiddins committed Dec 30, 2015
1 parent 13b7803 commit 54b6813
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/cocoapods/validator.rb
Expand Up @@ -699,11 +699,11 @@ def xcodebuild
command = %w(clean build -workspace App.xcworkspace -scheme App -configuration Release)
case consumer.platform_name
when :ios
command += %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator)
command += %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator) + ['-destination', 'name=iPhone 4s']
when :watchos
command += %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator)
command += %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator) + ['-destination', 'name=Apple Watch - 38mm']
when :tvos
command += %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator)
command += %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator) + ['-destination', 'name=Apple TV 1080p']
end

output, status = Dir.chdir(validation_dir) { _xcodebuild(command) }
Expand Down
6 changes: 3 additions & 3 deletions spec/unit/validator_spec.rb
Expand Up @@ -418,9 +418,9 @@ def podspec_path
Executable.expects(:which).with('xcodebuild').times(4).returns('/usr/bin/xcodebuild')
command = %w(clean build -workspace App.xcworkspace -scheme App -configuration Release)
Executable.expects(:capture_command).with('xcodebuild', command, :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator), :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator), :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator), :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk appletvsimulator) + ['-destination', 'name=Apple TV 1080p'], :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk iphonesimulator) + ['-destination', 'name=iPhone 4s'], :capture => :merge).once.returns(['', stub(:success? => true)])
Executable.expects(:capture_command).with('xcodebuild', command + %w(CODE_SIGN_IDENTITY=- -sdk watchsimulator) + ['-destination', 'name=Apple Watch - 38mm'], :capture => :merge).once.returns(['', stub(:success? => true)])
validator.validate
end

Expand Down

0 comments on commit 54b6813

Please sign in to comment.