SwiftPM cache dependencies like cocoapods

We have several developers working on our iOS app. Previously, we used CocoaPods to manage third-party libraries, with one person handling the submissions, allowing others to use them seamlessly. However, we have now transitioned to using Swift Package Manager (SPM). This change means that everyone needs to fetch dependencies individually, which has become time-consuming due to our network issues.

Is there a solution to help us manage this more efficiently?

Now,I save SourcePackages to NAS;when other developer get the dependence from network error or use too many time to solve packages;they could use it in NAS

That sounds like a good strategy. Mirroring is a pretty common solution to ensuring network integrity. SwiftPM can help with that too. See swift-evolution/proposals/0219-package-manager-dependency-mirroring.md at main · swiftlang/swift-evolution · GitHub for more.

This would be trivial if the Swift ecosystem properly support registries (namely, Xcode), as the zips required by registries are easy to cache separately. Ideally SPM would allow us to easily interpose new registries to act solely as a cache in front of known registries, but I don't think SPM's support has changed since it was introduced.