Class: Xcodeproj::Project::Object::PBXReferenceProxy

Inherits:
AbstractObject show all
Defined in:
lib/xcodeproj/project/object/reference_proxy.rb

Overview

Apparently a proxy for a reference object which might belong another project contained in the same workspace of the project document.

This class is used for referencing the products of another project.

Attributes collapse

Attributes inherited from AbstractObject

#isa, #project, #uuid

Helpers collapse

Methods inherited from AbstractObject

#<=>, #==, #inspect, isa, #nested_object_for_hash, #pretty_print, #sort, #sort_recursively, #to_ascii_plist, #to_hash

Instance Attribute Details

#file_typeString



22
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 22

attribute :file_type, String

#nameString



14
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 14

attribute :name, String

#pathString



18
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 18

attribute :path, String

#remote_refPBXContainerItemProxy



27
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 27

has_one :remote_ref, PBXContainerItemProxy

#source_treeString

Returns the source tree for the path of the reference.

Examples:

"BUILT_PRODUCTS_DIR"


34
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 34

attribute :source_tree, String

Instance Method Details

#ascii_plist_annotationObject

———————————————————————#



52
53
54
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 52

def ascii_plist_annotation
  " #{name || path && File.basename(path)} "
end

#build_filesArray<PBXBuildFile>



68
69
70
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 68

def build_files
  referrers.grep(PBXBuildFile)
end

#display_nameString



59
60
61
62
63
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 59

def display_name
  return name if name
  return path if path
  super
end

#proxy?Bool

Checks whether the reference is a proxy.



46
47
48
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 46

def proxy?
  true
end

#remove_from_projectvoid

This method returns an undefined value.

In addition to removing the reference proxy, this will also remove any items related to this reference.



79
80
81
82
# File 'lib/xcodeproj/project/object/reference_proxy.rb', line 79

def remove_from_project
  build_files.each(&:remove_from_project)
  super
end