So there should not be any issue linking Swift runtime using one of the approaches above with daemon, right?
I presume you’re talking about options A and B, because option C suggests static linking. If that’s correct then you’re correct, there shouldn’t be any problems using this approach for both the Swift runtime libraries and any other frameworks you need.
There are a bunch of potential gotchas here but the one that immediately springs to mind is library validation (see the
library
flag in the
codesign
man page). This definitely won’t be a problem for B because all of your components are within your bundle. Option A is a bit trickier. I believe that library validation allows you to link with non-system libraries by absolute path as long as the libraries are signed by you. However, the man page doesn’t mention that possibility, so I may be wrong. If you need a definitive answer on this you should open a
DTS tech support incident and talk to our Mac code signing specialist.
Regardless, library validation is an opt-in thing.
ps If you’re working on the edges of macOS you definitely need to watch WWDC 2018 Session 702 Your Apps and the Future of macOS Security, which talks about some important developments in the 10.14 timeframe.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"