package(name:url:_:)

    Adds a remote package dependency with a given version requirement.

    PackageDependency.swift:533

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

    static func package(name: String?, url: String, _ requirement: Package.Dependency.Requirement) -> Package.Dependency

    Parameters

    name

    The name of the Swift package or nil to deduce the name from the package’s Git URL.

    url

    The valid Git URL of the package.

    requirement

    A dependency requirement. See static methods on 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