class Xcodeproj::Project::Object::PBXTargetDependency
Represents a dependency of a target on another one.
Public Instance Methods
ascii_plist_annotation()
click to toggle source
# File lib/xcodeproj/project/object/target_dependency.rb, line 56 def ascii_plist_annotation " #{isa} " end
display_name()
click to toggle source
@return [String] The name of the dependency.
# File lib/xcodeproj/project/object/target_dependency.rb, line 49 def display_name return name if name return target.name if target return target_proxy.remote_info if target_proxy return product_ref.product_name if product_ref end
native_target_uuid()
click to toggle source
@return [String] the uuid of the target if the dependency is a native
target, the uuid of the target in the sub-project if the dependency is a target proxy, nil if the dependency is a Swift Package.
# File lib/xcodeproj/project/object/target_dependency.rb, line 65 def native_target_uuid return target.uuid if target return target_proxy.remote_global_id_string if target_proxy return nil if product_ref raise "Expected target or target_proxy, from which to fetch a uuid for target '#{display_name}'." \ "Find and clear the PBXTargetDependency entry with uuid '#{@uuid}' in your .xcodeproj." end
sort_recursively(_options = nil)
click to toggle source
@note This is a no-op, because the targets could theoretically depend
on each other, leading to a stack level too deep error.
@see AbstractObject#sort_recursively
# File lib/xcodeproj/project/object/target_dependency.rb, line 92 def sort_recursively(_options = nil) end
to_tree_hash()
click to toggle source
@note This override is necessary because Xcode allows for circular
target dependencies.
@return [Hash<String => String>] Returns a cascade representation of
the object without UUIDs.
# File lib/xcodeproj/project/object/target_dependency.rb, line 79 def to_tree_hash hash = {} hash['displayName'] = display_name hash['isa'] = isa hash['targetProxy'] = target_proxy.to_tree_hash if target_proxy hash end