10
10
# @param [PodTarget] target
11
11
# a specific pod target
12
12
#
13
- def build_for_iosish_platform ( sandbox ,
14
- build_dir ,
13
+ def build_for_iosish_platform ( sandbox ,
14
+ build_dir ,
15
15
output_path ,
16
- target ,
17
- device ,
16
+ target ,
17
+ deployment_target ,
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
24
- deployment_target = target . platform . deployment_target . to_s
25
-
26
25
target_label = target . label # name with platform if it's used in multiple platforms
27
26
Pod ::UI . puts "Prebuilding #{ target_label } ..."
28
27
@@ -46,14 +45,14 @@ def build_for_iosish_platform(sandbox,
46
45
device_binary = device_framework_path + "/#{ module_name } "
47
46
simulator_binary = simulator_framework_path + "/#{ module_name } "
48
47
return unless File . file? ( device_binary ) && File . file? ( simulator_binary )
49
-
48
+
50
49
# the device_lib path is the final output file path
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.
58
57
device_swiftmodule_path = device_framework_path + "/Modules/#{ module_name } .swiftmodule"
59
58
simulator_swiftmodule_path = simulator_framework_path + "/Modules/#{ module_name } .swiftmodule"
@@ -127,7 +126,7 @@ def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_optio
127
126
raise "shouldn't be handle 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