File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -39,5 +39,32 @@ def test_pod
39
39
# https://github.com/CocoaPods/CocoaPods/issues/7009
40
40
super unless consumer . platform_name == :watchos
41
41
end
42
+
43
+ def xcodebuild ( action , scheme , configuration )
44
+ require 'fourflusher'
45
+ command = %W( clean #{ action } -workspace #{ File . join ( validation_dir , 'App.xcworkspace' ) } -scheme #{ scheme } -configuration #{ configuration } )
46
+ case consumer . platform_name
47
+ when :osx , :macos
48
+ command += %w( CODE_SIGN_IDENTITY= )
49
+ when :ios
50
+ command += %w( CODE_SIGN_IDENTITY=- -sdk iphonesimulator )
51
+ command += Fourflusher ::SimControl . new . destination ( nil , 'iOS' , deployment_target )
52
+ when :watchos
53
+ command += %w( CODE_SIGN_IDENTITY=- -sdk watchsimulator )
54
+ command += Fourflusher ::SimControl . new . destination ( :oldest , 'watchOS' , deployment_target )
55
+ when :tvos
56
+ command += %w( CODE_SIGN_IDENTITY=- -sdk appletvsimulator )
57
+ command += Fourflusher ::SimControl . new . destination ( :oldest , 'tvOS' , deployment_target )
58
+ end
59
+
60
+ begin
61
+ _xcodebuild ( command , true )
62
+ rescue => e
63
+ message = 'Returned an unsuccessful exit code.'
64
+ message += ' You can use `--verbose` for more information.' unless config . verbose?
65
+ error ( 'xcodebuild' , message )
66
+ e . message
67
+ end
68
+ end
42
69
end
43
70
end
You can’t perform that action at this time.
0 commit comments