Class: Xcodeproj::Project::Object::PBXCopyFilesBuildPhase
- Inherits:
-
AbstractBuildPhase
- Object
- AbstractObject
- AbstractBuildPhase
- Xcodeproj::Project::Object::PBXCopyFilesBuildPhase
- Defined in:
- lib/xcodeproj/project/object/build_phase.rb
Overview
This phase can appear multiple times in a target.
Phase that copies the files to the bundle of the target (aka ‘Copy Files`).
Attributes collapse
-
#dst_path ⇒ String
The subpath of ‘dst_subfolder_spec` where this file should be copied to.
-
#dst_subfolder_spec ⇒ String
The path (destination) where the files should be copied to.
-
#name ⇒ String
The name of the build phase.
Attributes inherited from AbstractBuildPhase
#always_out_of_date, #build_action_mask, #comments, #run_only_for_deployment_postprocessing
Attributes inherited from AbstractObject
Attributes collapse
-
#pretty_print ⇒ Hash{String => Hash}
A hash suitable to display the build phase to the user.
-
#symbol_dst_subfolder_spec ⇒ Symbol
Alias method for #dst_subfolder_spec, which returns symbol values instead of numeric string values.
-
#symbol_dst_subfolder_spec=(value) ⇒ Object
Alias method for #dst_subfolder_spec=, which accepts symbol values instead of numeric string values.
Methods inherited from AbstractBuildPhase
#add_file_reference, #ascii_plist_annotation, #build_file, #clear, #display_name, #file_display_names, #files, #files_references, #include?, #remove_build_file, #remove_file_reference
Methods inherited from AbstractObject
#<=>, #==, #ascii_plist_annotation, #display_name, #inspect, isa, #nested_object_for_hash, #remove_from_project, #sort, #sort_recursively, #to_ascii_plist, #to_hash
Instance Attribute Details
#dst_path ⇒ String
Can accept environment variables like ‘$(PRODUCT_NAME)`.
Returns the subpath of ‘dst_subfolder_spec` where this file should be copied to.
210 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 210 attribute :dst_path, String, '' |
#dst_subfolder_spec ⇒ String
Returns the path (destination) where the files should be copied to.
215 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 215 attribute :dst_subfolder_spec, String, Constants::COPY_FILES_BUILD_PHASE_DESTINATIONS[:resources] |
#name ⇒ String
Returns the name of the build phase.
203 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 203 attribute :name, String |
Instance Method Details
#pretty_print ⇒ Hash{String => Hash}
Returns A hash suitable to display the build phase to the user.
220 221 222 223 224 225 226 227 228 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 220 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 ⇒ Symbol
Alias method for #dst_subfolder_spec, which returns symbol values instead of numeric string values.
250 251 252 253 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 250 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) ⇒ Object
Alias method for #dst_subfolder_spec=, which accepts symbol values instead of numeric string values.
238 239 240 241 242 243 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 238 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 |