How to embed Swift Package executable into macOS app


I have a macOS app I’d like to embed an executable from a swift package. However, while I can add the swift package under the app target’s “Frameworks, Libraries, and Embedded Content” section, and add it to Dependencies in Build Phases, it doesn’t show up as a project resource in the “Copy Bundle Resources” section. Is there some step I’m missing?

Also, I had accidentally dragged the executable to my project and added that in the “Copy Bundle Resources” section, but when I tried to notarize it refused because the executable wasn’t built with hardened runtime. Is it possible to build a command-line executable from a Swift package with hardened runtime?

This is all pointing me back to how I had first added this, with a separate target and scheme in the main project for the command line tool. However, that also added the command line tool as a product, and even though I turned off “Archive” in the scheme for the command line tool it was still archived as a separate product. This archived as a folder with both products and I wasn’t able to use Xcode’s built-in notarization process. I can notarize outside of Xcode if I have to but it doesn’t seem like this should be so difficult. Also I’d prefer to have the command line tool in its own project if possible.

Jim Crate