Class: Pod::Installer::Xcode::PodsProjectGenerator::PodTargetIntegrator
- Inherits:
-
Object
- Object
- Pod::Installer::Xcode::PodsProjectGenerator::PodTargetIntegrator
- Defined in:
- lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb
Overview
This class is responsible for integrating a pod target. This includes integrating the test targets included by each pod target.
Instance Attribute Summary collapse
-
#target_installation_result ⇒ TargetInstallationResult
readonly
The installation result of the target that should be integrated.
-
#use_input_output_paths ⇒ Boolean
(also: #use_input_output_paths?)
readonly
Whether to use input/output paths for build phase scripts.
Instance Method Summary collapse
-
#initialize(target_installation_result, use_input_output_paths: true) ⇒ PodTargetIntegrator
constructor
Initialize a new instance.
-
#inspect ⇒ String
A string representation suitable for debugging.
-
#integrate! ⇒ void
Integrates the pod target.
Constructor Details
#initialize(target_installation_result, use_input_output_paths: true) ⇒ PodTargetIntegrator
Initialize a new instance
23 24 25 26 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 23 def initialize(target_installation_result, use_input_output_paths: true) @target_installation_result = target_installation_result @use_input_output_paths = use_input_output_paths end |
Instance Attribute Details
#target_installation_result ⇒ TargetInstallationResult (readonly)
Returns the installation result of the target that should be integrated.
11 12 13 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 11 def target_installation_result @target_installation_result end |
#use_input_output_paths ⇒ Boolean (readonly) Also known as: use_input_output_paths?
Returns whether to use input/output paths for build phase scripts.
15 16 17 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 15 def use_input_output_paths @use_input_output_paths end |
Instance Method Details
#inspect ⇒ String
Returns a string representation suitable for debugging.
48 49 50 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 48 def inspect "#<#{self.class} for target `#{target.label}'>" end |
#integrate! ⇒ void
This method returns an undefined value.
Integrates the pod target.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb', line 32 def integrate! UI.section() do target_installation_result.non_library_specs_by_native_target.each do |native_target, spec| (native_target, spec) add_copy_resources_script_phase(native_target, spec) add_on_demand_resources(native_target, spec) if spec.app_specification? UserProjectIntegrator::TargetIntegrator.create_or_update_user_script_phases(script_phases_for_specs(spec), native_target) end add_copy_dsyms_script_phase(target_installation_result.native_target) add_copy_xcframeworks_script_phase(target_installation_result.native_target) UserProjectIntegrator::TargetIntegrator.create_or_update_user_script_phases(script_phases_for_specs(target.library_specs), target_installation_result.native_target) end end |