2

I have uploaded my binary artifacts in maven-central repository. I am fetching these libraries through SPM. I am getting the below error most of the times.

xcodebuild: error: Could not resolve package dependencies:
failed downloading which is required by binary target: 
DerivedData/SourcePackages/artifacts/MyLib/MyLib.xcframework.zip already exists in file system. fatalError

My Swift package manifest targets as below:

 targets: [
        // ---- Binaries -----
        .binaryTarget(
            name: "MyLib",
            url: "\(myPrivateArtefactURL)/MyLib.xcframework.zip",
            checksum: "checksum"
        )
    ]

However dependencies are getting resolved if I delete artficats folder manually and run the resolving dependencies command. I am not understanding what is the problem?. I want to get rid off this manually deleting the folder.

  • For what it's worth, I'm seeing the same error, but with a public Facebook release on GitHub. I think it's a bug in SPM or something. Here's a blog post related to it: https://pspdfkit.com/blog/2022/download-failures-with-swift-package-manager-binary-targets/ – damd Sep 10 '22 at 13:07

0 Answers0