Closed SergeyKuryanov closed 4 years ago
I had to duplicate copy-helper.sh script due to big differences in paths. Maybe we can generalize logic in copy-helper.sh and create variants for Carthage and SwiftPM?
Nah. I plan to drop support for Carthage when Xcode 12 is out.
Did you test that this actually works properly? That the helper app is copied into the app bundle, properly signed, and that the containing app launches at login?
@sindresorhus sorry, no. I already spot an issue, move PR into Draft, and thinking about how to fix it. Here is the problem: SwiftPM can build only plain executables, not APP
. But I believe that the helper needs to be an APP? To make this happen I see only one way - make the helper as separate project into resources and build it in Run Script stage with own script. What do you think?
Alternatively, we could just prebuild the helper app and commit it to the repo. The helper app will rarely change anyway. I think that would be easier and be less fragile.
Great idea. I am not very familiar with Mac Dev, do we need to include Debug and Release versions or just Release will be enough?
Just "release".
@sindresorhus seems like everything works as expected now. Test app launches after the start of Debug and Release configs while using Remote Package.
I just realized, now that we bundle the built helper app, we could solve: https://github.com/sindresorhus/LaunchAtLogin#the-size-of-my-app-increased-after-adding-launchatlogin We could bundle two helper apps, the current one, and a version that is built with target macOS 10.14.4 and later (that's the only difference), which wouldn't need all the Swift runtime libraries. The copy-helper script could detect the target macOS version and choose the correct helper app. Would you be willing to add that?
We script could check the environment variable MACOSX_DEPLOYMENT_TARGET
.
Can you fix the merge conflict?
Sorry for the delay. I will get to this soon. I haven't prioritized it as it cannot be released until Xcode 12 final is out anyway (which is at least 3 weeks).
I have now thoroughly tested this using Xcode 12 GM and it seems to work great. Nice work! 👍🏻
Fixes #4
To test this Xcode 12 is required.
I had to duplicate
copy-helper.sh
script due to big differences in paths. Maybe we can generalize logic incopy-helper.sh
and create variants forCarthage
andSwiftPM
?IssueHunt Summary
### Referenced issues This pull request has been submitted to: - [#4: Support Swift Package Manager](https://issuehunt.io/repos/98812730/issues/4) ---