Class: Xcodeproj::Project::Object::PBXBuildFile
- Inherits:
-
AbstractObject
- Object
- AbstractObject
- Xcodeproj::Project::Object::PBXBuildFile
- Defined in:
- lib/xcodeproj/project/object/build_file.rb
Overview
Contains the information about the build settings of a file used by an AbstractBuildPhase.
Instance Attribute Summary
Attributes inherited from AbstractObject
Attributes collapse
-
#file_ref ⇒ PBXFileReference
The file to build.
-
#platform_filter ⇒ String
The platform filter for this build file.
-
#platform_filters ⇒ Array<String>
The platform filters for this build file.
-
#product_ref ⇒ XCSwiftPackageProductDependency
The Swift Package file to build.
-
#settings ⇒ Hash
The list of build settings for this file.
AbstractObject Hooks collapse
- #ascii_plist_annotation ⇒ Object
-
#display_name ⇒ String
A name suitable for displaying the object to the user.
-
#pretty_print ⇒ Hash{String => Hash}, String
A hash suitable to display the object to the user.
Methods inherited from AbstractObject
#<=>, #==, #inspect, isa, #nested_object_for_hash, #remove_from_project, #sort, #sort_recursively, #to_ascii_plist, #to_hash
Instance Method Details
#ascii_plist_annotation ⇒ Object
76 77 78 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 76 def ascii_plist_annotation " #{display_name} in #{GroupableHelper.parent(self).display_name} " end |
#display_name ⇒ String
Returns A name suitable for displaying the object to the user.
55 56 57 58 59 60 61 62 63 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 55 def display_name if product_ref product_ref.display_name elsif file_ref file_ref.display_name else super end end |
#file_ref ⇒ PBXFileReference
I think that is possible to add any kind of group (for example folders linked to a path).
Returns the file to build.
26 27 28 29 30 31 32 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 26 has_one :file_ref, [ PBXFileReference, PBXGroup, PBXVariantGroup, XCVersionGroup, PBXReferenceProxy, ] |
#platform_filter ⇒ String
Returns the platform filter for this build file.
40 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 40 attribute :platform_filter, String |
#platform_filters ⇒ Array<String>
Returns the platform filters for this build file.
44 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 44 attribute :platform_filters, Array |
#pretty_print ⇒ Hash{String => Hash}, String
Returns A hash suitable to display the object to the user.
68 69 70 71 72 73 74 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 68 def pretty_print if settings.nil? || settings.empty? display_name else { display_name => settings } end end |
#product_ref ⇒ XCSwiftPackageProductDependency
Returns the Swift Package file to build.
36 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 36 has_one :product_ref, XCSwiftPackageProductDependency |
#settings ⇒ Hash
The contents of this array depend on the phase of the build file.
For PBXHeadersBuildPhase is ‘{ “ATTRIBUTES” => [:value] }` where `:value` can be `Public`, `Private`, or nil (Protected).
Returns the list of build settings for this file.
19 |
# File 'lib/xcodeproj/project/object/build_file.rb', line 19 attribute :settings, Hash |