SPM Could not resolve package dependencies

Currently, I am working on binary XCFramework. For some time I simply hosted SPM package on GitLab but recently I had to create another repo with the same framework. The issue is that after Cloning old repo Changing its origin and URL in Package.swift  Pushing it to new repo Xcode fails to resolve package graph. The error is: Resolve Package Graph failed downloading "http_link_to_package.zip" which is required by binary target 'package name': ~/Library/Developer/Xcode/DerivedData/bim-gxfvjyyecuziudbusqkrtpdhgrtv/SourcePackages/artifacts/package_name/package_name.zip already exists in file system

I have tried: rm -rf ~/Library/Cache/org.swift.spm  rm -rf ~/Library/Xcode/DerivedData reset package cache from Xcode resolve package cache xcodebuild -resolvePackageDependencies resolve in a completely new project searching for package_name.zip on the system and deleting all found packages. 

I do understand it is a strange use case but I don't see any reason why it should not work as expected.  Has any one faced something similar? Any ideas are appreciated

UPD text formatting

Currently, I am working on binary XCFramework. For some time I simply hosted SPM package on GitLab but recently I had to create another repo with the same framework. The issue is that after

  • Cloning old repo
  • Changing its origin and URL in Package.swift 
  • Pushing it to new repo
  • Xcode fails to resolve package graph.

The error is: Resolve Package Graph failed downloading "http_link_to_package.zip" which is required by binary target 'package name': ~/Library/Developer/Xcode/DerivedData/bim-gxfvjyyecuziudbusqkrtpdhgrtv/SourcePackages/artifacts/package_name/package_name.zip already exists in file system

I have tried:

  • rm -rf ~/Library/Cache/org.swift.spm
  • rm -rf ~/Library/Xcode/DerivedData
  • reset package cache from Xcode
  • resolve package cache
  • xcodebuild -resolvePackageDependencies in a completely new project
  • searching for package_name.zip on the system and deleting all found packages. 

I do understand it is a strange use case but I don't see any reason why it should not work as expected. Has any one faced something similar? Any ideas are appreciated

See this link https://pspdfkit.com/blog/2022/download-failures-with-swift-package-manager-binary-targets/

SPM Could not resolve package dependencies
 
 
Q