13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/cocoapods-kz/native/target_integrator.rb', line 13
def handle_on_demand_resources_script_phase
phase_name = "[KZ] On Demand Resources Build"
native_targets.each do |native_target|
phase = TargetIntegrator.create_or_update_shell_script_build_phase(native_target, phase_name)
if KZ::KZGlobalHelper.instance.on_demand_resources_info.odr_target_names.include?(native_target.name)
native_target.build_phases.push(phase).uniq! unless native_target.build_phases.include?(phase)
phase.shell_script = "#{KZ.deal_path_for_xcconfig(KZ::KZ_ON_DEMAND_RESOURCES_SHELL, true)}\n"
phase.shell_path = '/bin/zsh'
phase.input_paths = Array["#{KZ::KZ_POD_CONFIG_ROOT_STR}/KZOnDemandResourcesAllConfig.plist"]
phase.output_paths = Array['${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/KZOnDemandResourcesAllConfig.plist']
else
native_target.build_phases.delete(phase) if native_target.build_phases.include?(phase)
end
end
end
|