Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: enable embedding CLI app within (Mac) application #4205

Closed
MariusDeReus opened this issue Mar 1, 2022 · 2 comments · Fixed by #5023
Closed

Request: enable embedding CLI app within (Mac) application #4205

MariusDeReus opened this issue Mar 1, 2022 · 2 comments · Fixed by #5023
Labels
bounty Resolving this issue is rewarded with a bounty: https://github.com/tuist/tuist/discussions/4982 type:enhancement New feature or request

Comments

@MariusDeReus
Copy link
Contributor

Maybe not common for iOS, but It happens quite often that a macOS app embeds a command line application to execute certain tasks.
For example (in our case) a CLI app that is able to restart the main application.

'Before Tuist' these are the steps to achieve this:

  • Configure a separate build target for the CLI,
  • Make the main app target depend on the CLI target
  • And then lastly add a copy build step that copies the CLI into the main app bundle

App setup before Tuist

The problem is that this is currently not possible to configure in Tuist manifests, which means that we cannot convert our project to be build by Tuist.
When you add a CLI target as dependency for the main app target it results in this error when trying to generate the project:
Target <main app> has a dependency with target <CLI target> of type command line tool for platform 'macOS' which is invalid or not supported yet.

@kwridan kwridan added domain:generation type:enhancement New feature or request labels Mar 2, 2022
@danieleformichelli danieleformichelli added the bounty Resolving this issue is rewarded with a bounty: https://github.com/tuist/tuist/discussions/4982 label Jan 20, 2023
@serejahh
Copy link
Contributor

serejahh commented Feb 1, 2023

I've opened a PR with the fix. The only thing you need is to implement a copy phase using a custom script. You can use TARGET_BUILD_DIR variable to find the location of the launcher

@fortmarek
Copy link
Member

Hey @serejahh 👋

Thanks a lot for fixing this. As this issue was related to a bounty, we want to send you 50$ as a thank you for your work 🙏

You can contact me at marekfort@me.com or send us a DM on Twitter or Mastodon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Resolving this issue is rewarded with a bounty: https://github.com/tuist/tuist/discussions/4982 type:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants