Contents

Building Swift packages and Swift Playgrounds app projects with Xcode Cloud

Add your Swift package or Swift Playgrounds app project to an Xcode project to build it in Xcode Cloud.

Overview

Xcode Cloud comes with support for the Swift Package Manager, and using Swift package dependencies in your app project requires little to no configuration. However, Xcode Cloud can’t build standalone Swift packages. To build your Swift package with Xcode Cloud:

  1. Create an app project or workspace in Xcode.

  2. Add your Swift package as a local package as described in Organizing your code with local packages.

  3. Commit your Package.resolved file.

  4. Create your first workflow as described in Configuring your first Xcode Cloud workflow.

When Xcode Cloud starts a build, it builds your Swift package as part of the app project.

Similarly, Xcode Cloud can’t build standalone apps you create with Swift Playgrounds. To build an app you created with Swift Playgrounds, save the Swift Playground app project to your Mac, add it to an Xcode project as described above, then configure your first workflow for the Xcode project.

See Also

Setup and maintenance