Cache Swift Package Manager Dependencies Add via Xcode

Are there any suggestions for how to setup a reliable cache for Swift Package Manager dependencies that are managed directly in Xcode?

Screenshot 2020-07-08 10.09.07

Tracking the lock file ( [appName] .xcodeproj/project.workspace/xcshareddata/swiftpm/Package.resolved) results in frequent build timeouts on Circle. However not tracking the lock file would be non-deterministic as to the version resolved.

Any suggestion would be appreciated as I have not been able to find a good method for cacheing the resolved dependencies as they seem to only be resolved within the DerivedData folder which isn’t easily/reliably shared.

Is switching to cocoapods an option?

here is an article on caching SPM dependencies in CI swift package manager and how to cache it with ci

This caches the source but not the built frameworks.