Class: Xcodeproj::Project::Object::XCLocalSwiftPackageReference

Inherits:
AbstractObject
  • Object
show all
Defined in:
lib/xcodeproj/project/object/swift_package_local_reference.rb

Overview

This class represents a local Swift package reference.

Attributes collapse

Attributes inherited from AbstractObject

#isa, #project, #uuid

AbstractObject Hooks collapse

Methods inherited from AbstractObject

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

Instance Attribute Details

#pathString

Returns the repository url this Swift package was installed from.

Returns:

  • (String)

    the repository url this Swift package was installed from.



11
# File 'lib/xcodeproj/project/object/swift_package_local_reference.rb', line 11

attribute :path, String

#relative_pathString

Returns the repository path where the package is located relative to the Xcode project.

Returns:

  • (String)

    the repository path where the package is located relative to the Xcode project.



16
# File 'lib/xcodeproj/project/object/swift_package_local_reference.rb', line 16

attribute :relative_path, String

Instance Method Details

#ascii_plist_annotationObject

--------------------------------------#



21
22
23
# File 'lib/xcodeproj/project/object/swift_package_local_reference.rb', line 21

def ascii_plist_annotation
  " #{isa} \"#{File.basename(display_name)}\" "
end

#display_nameString

Returns the path of the local Swift package reference.

Returns:

  • (String)

    the path of the local Swift package reference.



27
28
29
30
# File 'lib/xcodeproj/project/object/swift_package_local_reference.rb', line 27

def display_name
  return relative_path if relative_path
  super
end