xcodebitbucketswift-package-managermatlab-spm

Swift Package Manager failed with: invalid archive returned from XY which is required by binary target


When adding the usercentrics package in swift package manager i get the following error:

invalid archive returned from 'https://bitbucket.org/usercentricscode/usercentrics-spm-sdk/downloads/Usercentrics-2.8.1.xcframework.zip' which is required by binary target 'Usercentrics'

enter image description here

When i download the framework in browser it returns a valid framework for the different platforms.

Framework folders

however when i try to do git clone (not sure if this is the right way to test it) it clones a folder with only a package.swift

enter image description here

I tried to remove any bitbucket ssh keys or certificates i might have. i cleaned the project, deleted derived data and reset the package cache. unfortunately without success. Searching for this error message did also not yield any results. usercentrics (in case this is specific to their repo) could also, as of now, not provide a solution to this issue.

Any help is greatly appreciated.


Solution

  • Answer by @steffen-funke from the comments:

    Found a solution for me in this github thread: https://github.com/apple/swift-package-manager/issues/6635

    Turned out it was some issue with macOS keychain and bitbucket.

    So looking for bitbucket credentials in keychain and deleting them (it's probably one that has been autocreated and is not used anyway) solved the issue. Hooray