@@ -14,14 +14,13 @@ def build_for_iosish_platform(sandbox,
14
14
build_dir ,
15
15
output_path ,
16
16
target ,
17
+ deployment_target ,
17
18
device ,
18
19
simulator ,
19
20
bitcode_enabled ,
20
21
custom_build_options = [ ] , # Array<String>
21
22
custom_build_options_simulator = [ ] # Array<String>
22
23
)
23
-
24
- deployment_target = target . platform . deployment_target . to_s
25
24
26
25
target_label = target . label # name with platform if it's used in multiple platforms
27
26
Pod ::UI . puts "Prebuilding #{ target_label } ..."
@@ -51,7 +50,7 @@ def build_for_iosish_platform(sandbox,
51
50
# combine the binaries
52
51
tmp_lipoed_binary_path = "#{ build_dir } /#{ target_name } "
53
52
lipo_log = `lipo -create -output #{ tmp_lipoed_binary_path } #{ device_binary } #{ simulator_binary } `
54
- puts lipo_log unless File . exist? ( tmp_lipoed_binary_path )
53
+ Pod :: UI . puts lipo_log unless File . exist? ( tmp_lipoed_binary_path )
55
54
FileUtils . mv tmp_lipoed_binary_path , device_binary , :force => true
56
55
57
56
# collect the swiftmodule file for various archs.
@@ -124,10 +123,10 @@ def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_optio
124
123
printer . pretty_print ( line )
125
124
end
126
125
else
127
- raise "shouldn't be handle by xcpretty"
126
+ raise "shouldn't be handled by xcpretty"
128
127
end
129
128
rescue
130
- puts log . red
129
+ Pod :: UI . puts log . red
131
130
end
132
131
end
133
132
[ is_succeed , log ]
@@ -149,7 +148,7 @@ class Prebuild
149
148
# [Pathname] output_path
150
149
# output path for generated frameworks
151
150
#
152
- def self . build ( sandbox_root_path , target , output_path , bitcode_enabled = false , custom_build_options = [ ] , custom_build_options_simulator = [ ] )
151
+ def self . build ( sandbox_root_path , target , min_deployment_target , output_path , bitcode_enabled = false , custom_build_options = [ ] , custom_build_options_simulator = [ ] )
153
152
154
153
return if target . nil?
155
154
@@ -159,7 +158,7 @@ def self.build(sandbox_root_path, target, output_path, bitcode_enabled = false,
159
158
160
159
# -- build the framework
161
160
case target . platform . name
162
- when :ios then build_for_iosish_platform ( sandbox , build_dir , output_path , target , 'iphoneos' , 'iphonesimulator' , bitcode_enabled , custom_build_options , custom_build_options_simulator )
161
+ when :ios then build_for_iosish_platform ( sandbox , build_dir , output_path , target , min_deployment_target , 'iphoneos' , 'iphonesimulator' , bitcode_enabled , custom_build_options , custom_build_options_simulator )
163
162
when :osx then xcodebuild ( sandbox , target . label , 'macosx' , nil , custom_build_options )
164
163
# when :tvos then build_for_iosish_platform(sandbox, build_dir, target, 'appletvos', 'appletvsimulator')
165
164
when :watchos then build_for_iosish_platform ( sandbox , build_dir , output_path , target , 'watchos' , 'watchsimulator' , true , custom_build_options , custom_build_options_simulator )
0 commit comments