I'm trying to create a Command Line Tool that uses the ArgumentParser swift package.
I've added the package to my project, and initially I got a lot of errors:
Library not loaded
(code signature in PackageFrameworks/ArgumentParser.framework/Versions/A/ArgumentParser' not valid for use in process:
(no such file, not in dyld cache)
I fixed it by disabling Library Validation in the Build Options, and my tool runs in Xcode beautifully. But the compiled executable won't work in Terminal, flagging the same errors.
I presume it's some signing/security thing (as usual), and I just need to set the right Build Options, but I haven't a clue which ones. I tried "Always Embed Swift Libraries", but that produced a warning message:
the product type 'com.apple.product-type.tool' is not a wrapper type.
Anyone know what might be going on?