@@ -14,14 +14,13 @@ def build_for_iosish_platform(sandbox,
1414 build_dir ,
1515 output_path ,
1616 target ,
17+ deployment_target ,
1718 device ,
1819 simulator ,
1920 bitcode_enabled ,
2021 custom_build_options = [ ] , # Array<String>
2122 custom_build_options_simulator = [ ] # Array<String>
2223 )
23-
24- deployment_target = target . platform . deployment_target . to_s
2524
2625 target_label = target . label # name with platform if it's used in multiple platforms
2726 Pod ::UI . puts "Prebuilding #{ target_label } ..."
@@ -51,7 +50,7 @@ def build_for_iosish_platform(sandbox,
5150 # combine the binaries
5251 tmp_lipoed_binary_path = "#{ build_dir } /#{ target_name } "
5352 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 )
5554 FileUtils . mv tmp_lipoed_binary_path , device_binary , :force => true
5655
5756 # collect the swiftmodule file for various archs.
@@ -124,10 +123,10 @@ def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_optio
124123 printer . pretty_print ( line )
125124 end
126125 else
127- raise "shouldn't be handle by xcpretty"
126+ raise "shouldn't be handled by xcpretty"
128127 end
129128 rescue
130- puts log . red
129+ Pod :: UI . puts log . red
131130 end
132131 end
133132 [ is_succeed , log ]
@@ -149,7 +148,7 @@ class Prebuild
149148 # [Pathname] output_path
150149 # output path for generated frameworks
151150 #
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 = [ ] )
153152
154153 return if target . nil?
155154
@@ -159,7 +158,7 @@ def self.build(sandbox_root_path, target, output_path, bitcode_enabled = false,
159158
160159 # -- build the framework
161160 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 )
163162 when :osx then xcodebuild ( sandbox , target . label , 'macosx' , nil , custom_build_options )
164163 # when :tvos then build_for_iosish_platform(sandbox, build_dir, target, 'appletvos', 'appletvsimulator')
165164 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