In a generated app project, there's a Project.workspace in the root directory. We can run xcodebuild -showBuildSettings to get the BUILD_DIR, e.g. ~/Library/Developer/Xcode/DerivedData/Project-bcckvvgkjwbdsiaioaqmdasetcac/Build/Products. Based on that, we can and should delete the entire Project-bcckvvgkjwbdsiaioaqmdasetcac folder, especially including its SourcePackages folder. Then, we can run xcodebuild -resolvePackageDependencies to fetch it again.
In a generated app project, there's a
Project.workspacein the root directory. We can runxcodebuild -showBuildSettingsto get theBUILD_DIR, e.g.~/Library/Developer/Xcode/DerivedData/Project-bcckvvgkjwbdsiaioaqmdasetcac/Build/Products. Based on that, we can and should delete the entireProject-bcckvvgkjwbdsiaioaqmdasetcacfolder, especially including itsSourcePackagesfolder. Then, we can runxcodebuild -resolvePackageDependenciesto fetch it again.