class Xcodeproj::Project::Object::PBXContainerItemProxy
Apparently a proxy for another object which might belong another project contained in the same workspace of the project document.
This class is referenced by {PBXTargetDependency} for information about it usage see the specs of that class.
@note This class references the other objects by UUID instead of
creating proper relationships because the other objects might be part of another project. This implies that the references to other objects should not increase the retain count of the targets.
@todo: This class needs some work to support targets across workspaces,
as the container portal might not be initialized leading xcodeproj to raise because ti can't find the UUID.
Public Instance Methods
ascii_plist_annotation()
click to toggle source
# File lib/xcodeproj/project/object/container_item_proxy.rb, line 110 def ascii_plist_annotation " #{isa} " end
container_portal_annotation()
click to toggle source
# File lib/xcodeproj/project/object/container_item_proxy.rb, line 94 def container_portal_annotation if remote? " #{File.basename(project.objects_by_uuid[container_portal].real_path)} " else project.root_object.ascii_plist_annotation end end
container_portal_object()
click to toggle source
# File lib/xcodeproj/project/object/container_item_proxy.rb, line 85 def container_portal_object if remote? container_portal_file_ref = project.objects_by_uuid[container_portal] Project.open(container_portal_file_ref.real_path) else project end end
proxied_object()
click to toggle source
Get the proxied object
@return [AbstractObject]
# File lib/xcodeproj/project/object/container_item_proxy.rb, line 81 def proxied_object container_portal_object.objects_by_uuid[remote_global_id_string] end
remote?()
click to toggle source
Checks whether the reference points to a remote project.
@return [Bool]
# File lib/xcodeproj/project/object/container_item_proxy.rb, line 73 def remote? project.root_object.uuid != container_portal end
to_hash_as(method = :to_hash)
click to toggle source
Calls superclass method
Xcodeproj::Project::Object::AbstractObject#to_hash_as
# File lib/xcodeproj/project/object/container_item_proxy.rb, line 102 def to_hash_as(method = :to_hash) hash = super if method == :to_ascii_plist hash['containerPortal'] = Nanaimo::String.new(container_portal, container_portal_annotation) end hash end