Swift Packages

Create reusable code, organize it in a lightweight way, and share it across Xcode projects and with other developers.


Swift packages are reusable components of Swift, Objective-C, Objective-C++, C, or C++ code that developers can use in their projects. Xcode supports creating and publishing Swift packages, as well as adding, removing, and managing package dependencies. The package management support in Xcode is built on top of the open source Swift Package Manager project.


Code Sharing

Adding Package Dependencies to Your App

Integrate package dependencies to share code between projects, or leverage code written by other developers.

Creating a Swift Package with Xcode

Create a Swift package to promote modularity and code reuse across your apps.

class Package

The configuration of a Swift package.

Publishing a Swift Package with Xcode

Publish your Swift package privately, or share it globally with other developers.

Building Apps that Use Swift Packages in Continuous Integration Workflows

Prepare apps to consume package dependencies within an existing continuous integration setup.