class Xcake::CopyFilesBuildPhase

This class is used to represent a copy files build phase

Attributes

code_sign[RW]

Whether the files should be code signed on copy

destination[RW]

The destination

destination_path[RW]

The destination path

files[RW]

The name of files to copy

name[RW]

The name of the build phase as shown in Xcode

Public Instance Methods

build_phase_type() click to toggle source
# File lib/xcake/dsl/build_phase/copy_files_build_phase.rb, line 20
def build_phase_type
  Xcodeproj::Project::Object::PBXCopyFilesBuildPhase
end
configure_native_build_phase(native_build_phase, context) click to toggle source
# File lib/xcake/dsl/build_phase/copy_files_build_phase.rb, line 24
def configure_native_build_phase(native_build_phase, context)
  native_build_phase.name = name
  native_build_phase.dst_path = destination_path
  native_build_phase.symbol_dst_subfolder_spec = destination

  @files.each do |file|
    file_reference = context.file_reference_for_path(file)
    build_file = native_build_phase.add_file_reference(file_reference)
    build_file.settings = { 'ATTRIBUTES' => ['CodeSignOnCopy'] } if code_sign
  end
end
to_s() click to toggle source
# File lib/xcake/dsl/build_phase/copy_files_build_phase.rb, line 36
def to_s
  "BuildPhase<#{name}>"
end