Package.Dependency
A package dependency of a Swift package.
Declaration
class DependencyOverview
A package dependency consists of a Git URL to the source of the package, and a requirement for the version of the package.
Swift Package Manager performs a process called dependency resolution to determine the exact version of the package dependencies that an app or other Swift package can use. The Package.resolved file records the results of the dependency resolution and lives in the top-level directory of a Swift package. If you add the Swift package as a package dependency to an app for an Apple platform, you can find the Package.resolved file inside your .xcodeproj or .xcworkspace.
Topics
Creating a package dependency from a URL
package(url:from:)package(url:from:traits:)package(url:_:)package(url:_:traits:)package(url:_:)package(url:_:traits:)package(url:branch:)package(url:branch:traits:)package(url:revision:)package(url:revision:traits:)package(url:exact:)package(url:exact:traits:)
Creating a package dependency from a registry
package(id:from:)package(id:from:traits:)package(id:_:)package(id:_:traits:)package(id:_:)package(id:_:traits:)package(id:exact:)package(id:exact:traits:)
Creating a local dependency
Declaring Requirements
traitsPackage.Dependency.TraitPackage.Dependency.RegistryRequirementPackage.Dependency.SourceControlRequirementrequirementPackage.Dependency.Requirement