How to not copy Swift Standard Library to additional app targets within a single macOS bundle

I have not been able to find the solution to this anywhere. I would like to have a single app bundle that could contain one or more “helper” apps, but only have a single Frameworks folder for the Swift Standard Library. I can easily do this with Swift Command Line Tools by changing “Runpath Search Paths” to look to the Frameworks folder within the main application bundle (even easier now with Swift 5 since you can’t include the libraries in your executable anyway), but I have not figured out how to have Xcode not run CopySwiftLibs during the build process for a Cocoa App target. If I change “Link With Standard Libraries” to NO, the build fails. What am I missing? I know this is possible because I have seen app bundles from other devs that have achieved what I am looking for.

Powered by WPeMatico

You may also like...

Comments are closed.