package(name:url:_:)

    Adds a package dependency starting with a specific minimum version, up to but not including a specified maximum version.

    PackageDependency.swift:381

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

    static func package(name: String, url: String, _ range: Range<Version>) -> 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.

    range

    The custom version range requirement.

    Returns

    A Package.Dependency instance.

    The following example allows the Swift Package Manager to pick versions 1.2.3, 1.2.4, 1.2.5, but not 1.2.6.

    .package(url: "https://example.com/example-package.git", "1.2.3"..<"1.2.6"),

    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