package(url:_:)

    Adds a remote package dependency given a version requirement.

    PackageDependency.swift:516

    This declaration was deprecated in SwiftPM 5.6: use specific requirement APIs instead (e.g. use 'branch:' instead of '.branch')

    static func package(url: String, _ requirement: Package.Dependency.Requirement) -> 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.

    requirement

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

    Returns

    A Package.Dependency instance.

    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