Issue with local .binaryTarget and local package

I am developing an SDK which includes a binary dependency. It is pretty common in our development flow to rebuild the binary and then test it in Xcode. This works within the context of the Swift package.

.binaryTarget(
    name: "FerrostarCoreRS",
    path: "common/target/ios/libferrostar-rs.xcframework"
)

So far so good. Now we want to have a real demo application that depends on the Swift package. This is naturally an Xcode project (targeting iOS in this case).

The issue arises when I try to depend on the Swift package using a local dependency. It is unable to find any products with a dependency on the binary target:

/Users/ianthetechie/ferrostar/apple/Demo App/iOS Demo.xcodeproj: error: Missing package product 'FerrostarCore' (in target 'iOS Demo' from project 'iOS Demo')
/Users/ianthetechie/ferrostar/apple/Demo App/iOS Demo.xcodeproj: error: Missing package product 'FerrostarMapLibreUI' (in target 'iOS Demo' from project 'iOS Demo')
/Users/ianthetechie/ferrostar/apple/Demo App/iOS Demo.xcodeproj: error: Missing package product 'FerrostarMapLibreUI' (in target 'iOS Demo' from project 'iOS Demo')
/Users/ianthetechie/ferrostar/apple/Demo App/iOS Demo.xcodeproj: error: Missing package product 'FerrostarCore' (in target 'iOS Demo' from project 'iOS Demo')

Everything works if I use a published artifact (ex: zipped framework with checksum published on GitHub), but this defeats the whole point of local development and makes testing cycles impossibly long.

1 Like