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

Returns the file type of the referenced filed.

Returns:

  • (String)

    the file type of the referenced filed.



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

attribute :file_type, String

#nameString

Returns the name of the reference.

Returns:

  • (String)

    the name of the reference.



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

attribute :name, String

#pathString

Returns the path of the referenced filed.

Returns:

  • (String)

    the path of the referenced filed.



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

attribute :path, String

#remote_refPBXContainerItemProxy

Returns the proxy to the project that contains the object.

Returns:



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"

Returns:

  • (String)

    the source tree for the path of the reference.



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>

Returns the build files associated with the current reference proxy.

Returns:

  • (Array<PBXBuildFile>)

    the build files associated with the current reference proxy.



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

def build_files
  referrers.grep(PBXBuildFile)
end

#display_nameString

Returns A name suitable for displaying the object to the user.

Returns:

  • (String)

    A name suitable for displaying the object to the user.



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.

Returns:

  • (Bool)

    always true for this ISA.



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