Class: Pod::Installer::PodTargetInstaller

Inherits:
TargetInstaller
  • Object
show all
Defined in:
lib/cocoapods-podtarget-optimize.rb

Overview

Creates the target for the Pods libraries in the Pods project and the relative support files.

Instance Method Summary collapse

Instance Method Details

#install!void

This method returns an undefined value.

Creates the target in the Pods project and the relative support files.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/cocoapods-podtarget-optimize.rb', line 13

def install!
  UI.message "- Installing target `#{target.name}` #{target.platform}" do
    add_target
    create_support_files_dir
    add_files_to_build_phases
    add_resources_bundle_targets
    create_xcconfig_file
    ########################## Added ##########################
    # if the souce build only have dummy.m, ignore this target
    if native_target.source_build_phase.files.count > 0
      create_prefix_header
    else
      project.targets.pop
      target.native_target = nil
      @native_target = nil
    end
    ########################## Added ##########################
  end
end