class Xcodeproj::Project::Object::PBXCopyFilesBuildPhase

Phase that copies the files to the bundle of the target (aka ‘Copy Files`).

@note This phase can appear multiple times in a target.

Public Instance Methods

pretty_print() click to toggle source

@return [Hash{String => Hash}] A hash suitable to display the build

phase to the user.
# File lib/xcodeproj/project/object/build_phase.rb, line 241
def pretty_print
  {
    display_name => {
      'Destination Path' => dst_path,
      'Destination Subfolder' => Constants::COPY_FILES_BUILD_PHASE_DESTINATIONS.key(dst_subfolder_spec).to_s,
      'Files' => files.map(&:pretty_print),
    },
  }
end
symbol_dst_subfolder_spec() click to toggle source

Alias method for dst_subfolder_spec, which returns symbol values instead of numeric string values.

@return [Symbol]

# File lib/xcodeproj/project/object/build_phase.rb, line 271
def symbol_dst_subfolder_spec
  key = Constants::COPY_FILES_BUILD_PHASE_DESTINATIONS.find { |_, num| num == dst_subfolder_spec }
  key ? key.first : nil
end
symbol_dst_subfolder_spec=(value) click to toggle source

Alias method for dst_subfolder_spec=, which accepts symbol values instead of numeric string values.

@param [Symbol] value

one of `COPY_FILES_BUILD_PHASE_DESTINATIONS.keys`

@raise [StandardError] if value is not a valid known key

# File lib/xcodeproj/project/object/build_phase.rb, line 259
def symbol_dst_subfolder_spec=(value)
  numeric_value = Constants::COPY_FILES_BUILD_PHASE_DESTINATIONS[value]
  raise "[Xcodeproj] Value checking error: got `#{value.inspect}` for" \
      ' attribute: dst_subfolder_spec' if numeric_value.nil?
  self.dst_subfolder_spec = numeric_value
end