How can I set up capabilities to provide macOS entitlements in SwiftPM, like enabling the hardened runtime?
I’m using Swift 6.0, so my command line tool SwiftPM project can build on all Apple-supported versions of macOS (macOS 14.5+, because Swift 6.0 requires Xcode 16+). The application can deploy back to macOS 10.15. If newer versions of Swift, SwiftPM, Xcode, etc. are required to facilitate capabilities, entitlements, and/or the hardened runtime, please let me know.
I’ve never used macOS capabilities / entitlements, the Xcode build system (just SwiftPM), code signing, etc. before, so more explicit instructions would be preferred. e.g., if codesign must be run with certain arguments, on what file at what time during the build process with what general configuration must it be run to, e.g., enable the hardened runtime?
I've seen a few things about this topic online, but everything was either for Xcode rather than SwiftPM, from many years ago (so probably vastly out of date), fairly vague about the whole process, etc. Thanks for any info.