Clone this repo:
  1. e36eebf Add missing word in documentation by Florian Reinhart · 3 years, 9 months ago main master upstream/master upstream/upstream/master swift-DEVELOPMENT-SNAPSHOT-2017-11-09-a
  2. 53c095c Add host target triple for s390x by Vivian Kong · 3 years, 9 months ago
  3. a227151 Fix typo by Arjun Nayini · 3 years, 9 months ago
  4. 84a5bc7 A few minor spelling errors and slight rewording by Brandon Titus · 3 years, 9 months ago swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-01-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-02-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-03-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-04-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-05-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-11-06-a swift-DEVELOPMENT-SNAPSHOT-2017-11-01-a swift-DEVELOPMENT-SNAPSHOT-2017-11-02-a swift-DEVELOPMENT-SNAPSHOT-2017-11-03-a swift-DEVELOPMENT-SNAPSHOT-2017-11-04-a swift-DEVELOPMENT-SNAPSHOT-2017-11-05-a swift-DEVELOPMENT-SNAPSHOT-2017-11-06-a swift-DEVELOPMENT-SNAPSHOT-2017-11-07-a swift-DEVELOPMENT-SNAPSHOT-2017-11-08-a
  5. 70805c8 Merge pull request #1382 from airspeedswift/remove-indexdistance by Ben Cohen · 3 years, 9 months ago swift-4.1-DEVELOPMENT-SNAPSHOT-2017-10-28-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-10-29-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-10-30-a swift-4.1-DEVELOPMENT-SNAPSHOT-2017-10-31-a swift-DEVELOPMENT-SNAPSHOT-2017-10-28-a swift-DEVELOPMENT-SNAPSHOT-2017-10-29-a swift-DEVELOPMENT-SNAPSHOT-2017-10-30-a swift-DEVELOPMENT-SNAPSHOT-2017-10-31-a

Swift Package Manager Project

The Swift Package Manager is a tool for managing distribution of source code, aimed at making it easy to share your code and reuse others’ code. The tool directly addresses the challenges of compiling and linking Swift packages, managing dependencies, versioning, and supporting flexible distribution and collaboration models.

We’ve designed the system to make it easy to share packages on services like GitHub, but packages are also great for private personal development, sharing code within a team, or at any other granularity.

Note that at this time the Package Manager has no support for iOS, watchOS, or tvOS platforms.

Table of Contents


To learn about the policies and best practices that govern contributions to the Swift project, please read the Contributor Guide.

If you are interested in contributing, please read the Community Proposal, which provides some context for decisions made in the current implementation and offers direction for the development of future features.

Instructions for setting up the development environment are available here.

The Swift package manager uses llbuild as the underlying build system for compiling source files. It is also open source and part of the Swift project.

System Requirements

The package manager’s system requirements are the same as those for Swift with the caveat that the package manager requires Git at runtime as well as build-time.


The Swift Package Manager is included in Xcode 8.0 and all subsequent releases.

The package manager is also available for other platforms as part of all Snapshots available at, including snapshots for the latest versions built from master. For installation instructions for downloaded snapshots, please see the Getting Started section of

You can verify your installation by typing swift package --version in a terminal:

$ swift package --version
Apple Swift Package Manager - ...

Managing Swift Environments

On macOS /usr/bin/swift is just a stub that forwards invocations to the active toolchain. Thus when you call swift build it will use the swift defined by your TOOLCHAINS environment variable. This can be used to easily switch between the default tools, and a development snapshot:

$ xcrun --find swift
$ swift --version
Apple Swift version 3.0
$ export TOOLCHAINS=swift
$ xcrun --find swift
$ swift --version
Swift version 3.0-dev

To use a specific toolchain you can set TOOLCHAINS to the CFBundleIdentifier in an .xctoolchain’s Info.plist.

Choosing a Swift Version

The SWIFT_EXEC environment variable specifies the swiftc executable path used by swift package. If it is not set, the package manager will try to locate it:

  1. In swift-package's parent directory.
  2. On macOS, by calling xcrun --find swiftc.
  3. By searching the PATH.


For extensive documentation on using Swift Package Manager, creating packages, and more, see Documentation.

For additional documentation on developing the Swift Package Manager itself, see Documentation/Development.


If you have any trouble with the package manager, help is available. We recommend:

If you’re not comfortable sharing your question with the list, contact details for the code owners can be found in CODE_OWNERS.txt; however, the mailing list is usually the best place to go for help.


Copyright 2015 - 2016 Apple Inc. and the Swift project authors. Licensed under Apache License v2.0 with Runtime Library Exception.

See for license information.

See for Swift project authors.