Class: Xcodeproj::Project::Object::PBXBuildFile

Inherits:
AbstractObject show all
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

#isa, #project, #uuid

Attributes collapse

AbstractObject Hooks collapse

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_annotationObject



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_nameString



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_refPBXFileReference



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_filterString



40
# File 'lib/xcodeproj/project/object/build_file.rb', line 40

attribute :platform_filter, String

#platform_filtersArray<String>



44
# File 'lib/xcodeproj/project/object/build_file.rb', line 44

attribute :platform_filters, Array

#pretty_printHash{String => Hash}, String



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_refXCSwiftPackageProductDependency



36
# File 'lib/xcodeproj/project/object/build_file.rb', line 36

has_one :product_ref, XCSwiftPackageProductDependency

#settingsHash

Note:

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