package(id:_:)

    Adds a package dependency starting with a specific minimum version, going up to and including a specific maximum version.

    PackageDependency.swift:664
    SwiftPM
    5.7+
    static func package(id: String, _ range: ClosedRange<Version>) -> Package.Dependency

    Parameters

    id

    The identity of the package.

    range

    The closed 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, as well as 1.2.6.

    .package(id: "scope.name", "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 (7)

    Hide obsolete interfaces

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces