Class: Pod::Installer::Xcode::PodsProjectGenerator::FileReferencesInstaller

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

Overview

Controller class responsible of installing the file references of the specifications in the Pods project.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sandbox, pod_targets, pods_project, preserve_pod_file_structure = false) ⇒ FileReferencesInstaller

Initialize a new instance

Parameters:

  • sandbox (Sandbox)

    @see #sandbox

  • pod_targets (Array<PodTarget>)

    @see #pod_targets

  • pods_project (Project)

    @see #pods_project

  • preserve_pod_file_structure (Bool) (defaults to: false)

    @see #preserve_pod_file_structure


32
33
34
35
36
37
# File 'lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb', line 32

def initialize(sandbox, pod_targets, pods_project, preserve_pod_file_structure = false)
  @sandbox = sandbox
  @pod_targets = pod_targets
  @pods_project = pods_project
  @preserve_pod_file_structure = preserve_pod_file_structure
end

Instance Attribute Details

#pod_targetsArray<PodTarget> (readonly)

Returns The pod targets of the installation.

Returns:

  • (Array<PodTarget>)

    The pod targets of the installation.


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

def pod_targets
  @pod_targets
end

#pods_projectProject (readonly)

Returns The project to install the file references into.

Returns:

  • (Project)

    The project to install the file references into.


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

def pods_project
  @pods_project
end

#preserve_pod_file_structureBool (readonly)

Returns add support for preserving the file structure of externally sourced pods, in addition to local pods.

Returns:

  • (Bool)

    add support for preserving the file structure of externally sourced pods, in addition to local pods.


23
24
25
# File 'lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb', line 23

def preserve_pod_file_structure
  @preserve_pod_file_structure
end

#sandboxSandbox (readonly)

Returns The sandbox of the installation.

Returns:

  • (Sandbox)

    The sandbox of the installation.


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

def sandbox
  @sandbox
end

Instance Method Details

#install!void

This method returns an undefined value.

Installs the file references.


43
44
45
46
47
48
49
50
51
52
# File 'lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb', line 43

def install!
  refresh_file_accessors
  prepare_pod_groups
  add_source_files_references
  add_frameworks_bundles
  add_vendored_libraries
  add_resources
  add_developer_files unless sandbox.development_pods.empty?
  link_headers
end