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, #sort
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.
231 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 231 attribute :dst_path, String, '' |
#dst_subfolder_spec ⇒ String
Returns the path (destination) where the files should be copied to.
236 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 236 attribute :dst_subfolder_spec, String, Constants::COPY_FILES_BUILD_PHASE_DESTINATIONS[:resources] |
#name ⇒ String
Returns the name of the build phase.
224 |
# File 'lib/xcodeproj/project/object/build_phase.rb', line 224 attribute :name, String |
Instance Method Details
#pretty_print ⇒ Hash{String => Hash}
Returns A hash suitable to display the build phase to the user.
241 242 243 244 245 246 247 248 249 |
# 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 ⇒ Symbol
Alias method for #dst_subfolder_spec, which returns symbol values instead of numeric string values.
271 272 273 274 |
# 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) ⇒ Object
Alias method for #dst_subfolder_spec=, which accepts symbol values instead of numeric string values.
259 260 261 262 263 264 |
# 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 |