Debugging "does not contain expected binary artifact" error

Hello, we are trying to make our compiled xcframework available on SwiftPM via a binaryTarget, but I am bumping into this error:

[40596/40596] Downloading binary artifactserror: downloaded archive of binary target 'LightningDevKit' does not contain expected binary artifact 'LightningDevKit'

Our project and Package.swift can be found here.

If it also helps, here is the file tree of our xcframework:

✗ tree ~/Downloads/LightningDevKit.xcframework -L 2
/Users/jurvistan/Downloads/LightningDevKit.xcframework
├── Info.plist
├── ios-arm64
│   └── LightningDevKit.framework
├── ios-arm64_x86_64-maccatalyst
│   └── LightningDevKit.framework
├── ios-arm64_x86_64-simulator
│   └── LightningDevKit.framework
└── macos-arm64_x86_64
    └── LightningDevKit.framework

any ideas on what the issue may be/where to start debugging?

Not sure if this is worth adding, but when I reference the binaryTarget with https://github.com/lightningdevkit/ldk-swift/releases/download/0.0.109/LightningDevKit.xcframework.zip,

.binaryTarget(
            name: "LightningDevKit",
            url: "https://github.com/lightningdevkit/ldk-swift/releases/download/0.0.109/LightningDevKit.xcframework.zip",
            checksum: "6793a2be7b8e5037cbb81030cce155285defd8a014c18be172cda00bc01199bb"
        ),

It gives me the same error as above. However, if I download the xcframework from https://github.com/lightningdevkit/ldk-swift/releases/download/0.0.109/LightningDevKit.xcframework.zip, and then unzip it to be referenced locally:

.binaryTarget(
            name: "LightningDevKit",
            path: "artifacts/LightningDevKit.xcframework"
        ),

it no longer complains.

any guesses?

Circling back to answer my own question, just in case anyone runs into the same issue. We were using ditto to zip our .xcframeworkfolder and forgot to include--keepParent`.

As a result, our LightningDevKit.framework.zip ended up inflating into the contents of LightningDevKit.framework, instead of the directory itself.

2 Likes