Closed rob-patchett closed 5 years ago
Hi, correct. That is because of the new Swift 5 included in 10.2 and the new included swift runtime in macOS 10.14.4.
And here is a thread on the swift forums about this:
I haven't had the need to do this so I have not investigated what the best approach is. But Apple has made it so that you probably have to compile two different versions of the app depending on if the user is < 10.14.4 or >= 10.14.4
And here, where they (Apple) say that you now MUST install the runtime package on versions older than 10.14.4 if you want cli tools built with xcode 10.2 to work on those Macs.
Ah yes, thanks for the links. It doesn't really sound like there's a big appetite for Apple to resolve this issue. I can't see an ideal solution to this and it looks like it will most likely depend on an individual application's use case (in my case the helper isn't crucial to the core functionality, so perhaps I restrict the helper to versions of macOS that come with embedded Swift libraries).
Thanks for the help with this! I'll will close this issue since it doesn't really apply to this sample.
I also came across this helpful solution for other types of apps that include a CLI tool: https://forums.developer.apple.com/thread/115020
Unfortunately it doesn't work for privileged helper tools, since the tool needs to be copied by SMJobBless.
Hey @erikberglund, I managed to have everything working when building from Xcode 10.1, but it seems that 10.2 is messing something up with the helper (still using Swift 4.2). Basically running the privileged helper doesn't work on <10.14.4. The install of the helper appears to work fine, but never actually launches (according to activity monitor).
I've investigated the build's package contents and a big difference I found is that the helper executable is a fraction of the size (down from 6.6MB with Xcode 10.1 to 91kB with Xcode 10.2). It seems the build process must have changed in Xcode 10.2, but I haven't yet found the exact cause.