Sha256: 7618879c9250acd479e41993e3692779b3942495cf756ebdfd0f7a91a1e27563

Contents?: true

Size: 1.07 KB

Versions: 10

Compression:

Stored size: 1.07 KB

Contents

module Xcake
  # This class is used to represent a copy files build phase
  #
  class CopyFilesBuildPhase < BuildPhase
    # The name of the build phase as shown in Xcode
    attr_accessor :name

    # The name of files to copy
    attr_accessor :files

    # The destination
    attr_accessor :destination

    # The destination path
    attr_accessor :destination_path

    # Whether the files should be code signed on copy
    attr_accessor :code_sign

    def build_phase_type
      Xcodeproj::Project::Object::PBXCopyFilesBuildPhase
    end

    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

    def to_s
      "BuildPhase<#{name}>"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
xcake-0.13.0 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.12.1 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.12.0 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.11.0 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.10.0 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.9.4 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.9.3 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.9.2 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.9.1 lib/xcake/dsl/build_phase/copy_files_build_phase.rb
xcake-0.9.0 lib/xcake/dsl/build_phase/copy_files_build_phase.rb