Search code examples
iosswiftcachingcontinuous-integrationswift-package-manager

Xcode 12.5: SPM Dependency Cache Location


Swift Package Manager got a new feature in Xcode 12.5:

Swift Package Manager caches package dependencies on a per-user basis, which reduces the amount of network traffic and increases performance of dependency resolution for subsequent uses of the same package. If needed, you can disable cache use in xcodebuild by using the new -disablePackageRepositoryCache flag. (72204929)

I would like to know where this is cached. Maybe we can use this to easily cache those dependencies in continuous environments.

I want to know what is the difference of this change to the behavior before since before there was already a cache folder in DerivedData. So what is the new thing here?


Solution

  • Xcode 12.5 release notes appear to be referring to ~/Library/Caches/org.swift.swiftpm/.