package(name:url:revision:)

    Adds a remote package dependency given a revision requirement.

    PackageDependency.swift:333

    This declaration was deprecated in SwiftPM 5.6: use package(url:revision:) instead

    static func package(name: String, url: String, revision: String) -> Package.Dependency

    Parameters

    name

    The name of the package, or nil to deduce it from the URL.

    url

    The valid Git URL of the package.

    revision

    A dependency requirement. See static methods on Requirement for available options.

    Returns

    A Package.Dependency instance.

    .package(url: "https://example.com/example-package.git", revision: "aa681bd6c61e22df0fd808044a886fc4a7ed3a65"),

    Other members in extension

    Types

    Show obsolete interfaces (1)

    Hide obsolete interfaces

    • enum Requirement

      An enum that represents the requirement for a package dependency.

    Type members

    Show obsolete interfaces (6)

    Hide obsolete interfaces

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces