AppCode
 
Get AppCode
You are viewing the documentation for an earlier version of AppCode.

Swift packages

Last modified: 24 March 2021

Swift packages are bundles of source files, binaries, and resources that you can reuse in your Xcode projects. In AppCode, you can work with Xcode projects that use Swift packages as well as with standalone Swift packages.

When you try to open a Swift package or an Xcode project with Swift package dependencies from an unknown source for the first time, AppCode displays a warning and lets you decide whether to trust the project or open it in safe mode. See more in Project security.

All Swift packages and dependencies are available from the Project tool window:

After loading a project, AppCode will start syncing its dependencies declared in Package.swift. You can manually invoke the synchronization later by selecting Tools | Swift Package Manager | Resolve Dependencies from the main menu or Swift Package Manager | Resolve Dependencies from the context menu of the Project tool window:

Swift SPM context menu

General code assistance features (completion, highlighting, and navigation) that you have in a regular Xcode project are available for Swift packages as well.