Class: Pod::Installer::Xcode::PodTargetDependencyInstaller

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb

Overview

Wires up the dependencies between targets from the target installation results

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sandbox, pod_target_installation_results, metadata_cache) ⇒ PodTargetDependencyInstaller

Initialize a new instance.

Parameters:

  • sandbox (Sandbox)

    @see #sandbox

  • pod_target_installation_results (TargetInstallationResults)

    @see #pod_target_installation_results

  • metadata_cache (ProjectMetadataCache)

    @see #metadata_cache


27
28
29
30
31
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb', line 27

def initialize(sandbox, pod_target_installation_results, )
  @sandbox = sandbox
  @pod_target_installation_results = pod_target_installation_results
   = 
end

Instance Attribute Details

#metadata_cacheProjectMetadataCache (readonly)

Returns The metadata cache for targets.

Returns:

  • (ProjectMetadataCache)

    The metadata cache for targets.


19
20
21
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb', line 19

def 
  
end

#pod_target_installation_resultsTargetInstallationResults (readonly)

Returns The target installation results for pod targets.

Returns:

  • (TargetInstallationResults)

    The target installation results for pod targets.


15
16
17
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb', line 15

def pod_target_installation_results
  @pod_target_installation_results
end

#sandboxSandbox (readonly)

Returns The sandbox used for this installation.

Returns:

  • (Sandbox)

    The sandbox used for this installation.


11
12
13
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb', line 11

def sandbox
  @sandbox
end

Instance Method Details

#install!Object


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb', line 33

def install!
  # Wire up pod targets
  pod_target_installation_results.values.each do |pod_target_installation_result|
    pod_target = pod_target_installation_result.target
    native_target = pod_target_installation_result.native_target
    project = native_target.project
    frameworks_group = project.frameworks_group

    # First, wire up all resource bundles.
    wire_resource_bundle_targets(pod_target_installation_result.resource_bundle_targets,
                                 native_target, pod_target)
    # Wire up all dependencies to this pod target, if any.
    wire_target_dependencies(pod_target, native_target, project, pod_target_installation_results,
                             , frameworks_group)

    # Wire up test native targets.
    unless pod_target_installation_result.test_native_targets.empty?
      wire_test_native_targets(pod_target, pod_target_installation_result, pod_target_installation_results,
                               project, frameworks_group, )
    end

    # Wire up app native targets.
    unless pod_target_installation_result.app_native_targets.empty?
      wire_app_native_targets(pod_target, native_target, pod_target_installation_result,
                              pod_target_installation_results, project, frameworks_group, )
    end
  end
end