There's a "Reset Package Caches" option in the menu in Xcode, but that resets them all, which takes a while. Is it possible to just reset one package cache?
In order to cache the dependencies, they should be located in the project directory, but by default, SPM downloads the dependencies into the system folder: ~/Library/Developer/Xcode/DerivedData.
To resolve, Open the project from the project panel, select the project (not the targets), then select the "Swift Packages" tab. Double click on the package you want to update and change the minimum version to the next major version.
| The swift package resolve command resolves the dependencies, taking into account the current version restrictions in the Package. swift manifest and Package. resolved resolved versions file, and issuing an error if the graph cannot be resolved.
To reset the cache for a single package:
~/Library/Caches/org.swift.swiftpm/repositories
and deleting the folder and lock file related to the packageFile-->Swift Packages-->Reset Package Caches
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With