I have a helper app that must, occasionally, run as root. I've spent the last year added a bunch of functionality in Swift and testing it on Big Sur without any problem.
I just now tried installing it on High Sierra (10.13.6), and when the helper is launch as the regular user is runs just fine. But when launched as root, I get
dyld: warning, LC_RPATH @executable_path/../Frameworks in /Users/USER/Library/Application Support/MyApp/Helper.app/Contents/MacOS/Helper being ignored in restricted program because of @executable_path
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /Users/USER/Library/Application Support/MyApp/Helper.app/Contents/MacOS/Helper
Reason: image not found
Abort trap: 6
So what do I need to do to get the Swift runtime libraries to load?