package(url:revision:)

    Adds a remote package dependency given a revision requirement.

    PackageDependency.swift:313
    SwiftPM
    5.5+
    static func package(url: String, revision: String) -> Package.Dependency

    Parameters

    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"),

    See also

    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 (7)

    Hide obsolete interfaces

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces