Class: Xcake::CopyFilesBuildPhase
- Inherits:
-
BuildPhase
- Object
- BuildPhase
- Xcake::CopyFilesBuildPhase
- Defined in:
- lib/xcake/dsl/build_phase/copy_files_build_phase.rb
Overview
This class is used to represent a copy files build phase
Instance Attribute Summary collapse
-
#code_sign ⇒ Object
Whether the files should be code signed on copy.
-
#destination ⇒ Object
The destination.
-
#destination_path ⇒ Object
The destination path.
-
#files ⇒ Object
The name of files to copy.
-
#name ⇒ Object
The name of the build phase as shown in Xcode.
Instance Method Summary collapse
- #build_phase_type ⇒ Object
- #configure_native_build_phase(native_build_phase, context) ⇒ Object
- #to_s ⇒ Object
Methods inherited from BuildPhase
Constructor Details
This class inherits a constructor from Xcake::BuildPhase
Instance Attribute Details
#code_sign ⇒ Object
Whether the files should be code signed on copy
18 19 20 |
# File 'lib/xcake/dsl/build_phase/copy_files_build_phase.rb', line 18 def code_sign @code_sign end |
#destination ⇒ Object
The destination
12 13 14 |
# File 'lib/xcake/dsl/build_phase/copy_files_build_phase.rb', line 12 def destination @destination end |
#destination_path ⇒ Object
The destination path
15 16 17 |
# File 'lib/xcake/dsl/build_phase/copy_files_build_phase.rb', line 15 def destination_path @destination_path end |
#files ⇒ Object
The name of files to copy
9 10 11 |
# File 'lib/xcake/dsl/build_phase/copy_files_build_phase.rb', line 9 def files @files end |
#name ⇒ Object
The name of the build phase as shown in Xcode
6 7 8 |
# File 'lib/xcake/dsl/build_phase/copy_files_build_phase.rb', line 6 def name @name end |
Instance Method Details
#build_phase_type ⇒ Object
20 21 22 |
# 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) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# 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 ⇒ Object
36 37 38 |
# File 'lib/xcake/dsl/build_phase/copy_files_build_phase.rb', line 36 def to_s "BuildPhase<#{name}>" end |