Hive Hive
Sign in

Fine-grained control over embed build phases

GitHub issue · Open

Metadata
Source
tuist/tuist #6810
Updated
Jun 11, 2026
Domains
Generated projects
Details

What happened?

This issue is related to this discussion.

I have attached a sample (TuistBug5.zip) containing two projects: one configured for tuist and another configured with Xcode. I have omitted adding the same targets. In the real app, we have x2 targets.

Below is an example of real-world app settings:

macOS version

14.6.1

Tuist version

4.28.1

Xcode version

16.0.0

Comments
F
fortmarek Oct 4, 2024

Hey @c128128 👋

Thanks a lot for providing the sample. Can you provide detailed explanation of what’s wrong with the Tuist project, why it’s wrong, and what would you expect Tuist to do? It’s hard for us to understand what your expectations are if you just include two sample projects – we have a lot of issues and PRs to go through and we can’t afford doing that kind of detective work 🙏

C
c128128 Oct 4, 2024

Hey @fortmarek,

Sorry about that; I was writing this late last night. :)

I need tuist to generate this structure: (everything is prepared in the sample project)

Image of structure

From my sample, I’ve created a dummy snapshot of our project with some targets embedded in our main app.

  1. tuist is currently managing embedding automatically.
  2. There isn’t a way to change the embedded target’s destination or add a subpath.

In this issue, I’ve described how this can be done.

Here is the Project.swift from the sample:

import ProjectDescription
let project = Project(
name: "Example",
targets: [
.target(
name: "MacBundle",
destinations: [.mac],
product: .bundle,
bundleId: "io.tuist.Example.bundle",
sources: [
"MacBundle/*.swift",
]
),
.target(
name: "LauncherApp",
destinations: [.mac],
product: .app,
bundleId: "io.tuist.Example.launcher",
sources: [
"LauncherApp/*.swift",
]
),
.target(
name: "ScreenCapture",
destinations: [.mac],
product: .xpc,
bundleId: "io.tuist.Example.screenCapture",
sources: ["ScreenCapture/*.swift"]
),
.target(
name: "WebExtension",
destinations: [.mac],
product: .appExtension,
bundleId: "io.tuist.Example.webExtension",
sources: ["WebExtension/*.swift"]
),
.target(
name: "Example",
destinations: [.iPhone, .iPad, .macCatalyst],
product: .app,
bundleId: "io.tuist.Example",
sources: ["Example/Sources/**"],
resources: ["Example/Resources/**"],
dependencies: [
// .target(name: "MacBundle", condition: .when([.catalyst])),
// .target(name: "LauncherApp", condition: .when([.catalyst])),
// .target(name: "ScreenCapture", condition: .when([.catalyst])),
// .target(name: "WebExtension", condition: .when([.catalyst])),
]
)
]
)

If I uncomment .target(name: "MacBundle", condition: .when([.catalyst])), I am getting:

Target Example has platforms 'iOS' and product 'application' and depends on target MacBundle of type 'bundle' and platforms 'macOS' which is an invalid or not yet supported combination.

If I uncomment .target(name: "LauncherApp", condition: .when([.catalyst])), I am getting:

Target Example has platforms 'iOS' and product 'application' and depends on target LauncherApp of type 'application' and platforms 'macOS' which is an invalid or not yet supported combination.

If I uncomment .target(name: "ScreenCapture", condition: .when([.catalyst])), I am getting:

Target Example has platforms 'iOS' and product 'application' and depends on target ScreenCapture of type 'xpc' and platforms 'macOS' which is an invalid or not yet supported combination.

If I uncomment .target(name: "WebExtension", condition: .when([.catalyst])), I am getting:

Target Example has platforms 'iOS' and product 'application' and depends on target WebExtension of type 'app extension' and platforms 'macOS' which is an invalid or not yet supported combination.
D
dosubot[bot] Oct 5, 2025

Hi, @c128128. I’m Dosu, and I’m helping the tuist team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You requested enhanced control over embed build phases in Tuist to specify destination and subpath for embedded targets.
  • The current automatic embedding in Tuist causes invalid platform/product dependency errors when embedding macOS targets into an iOS app with Catalyst.
  • You provided a sample project and detailed examples illustrating the problem.
  • The discussion has focused on supporting complex multi-target, multi-platform embedding scenarios.
  • The issue remains unresolved with no recent updates.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Tuist by commenting here.
  • If I do not hear back within 7 days, the issue will be automatically closed.

Thanks for your understanding and contribution!

C
c128128 Oct 6, 2025

Yes, this is still an issue.

D
dosubot[bot] Oct 6, 2025

@pepicrft The user confirmed that the issue with enhanced control over embed build phases and platform/product dependency errors when embedding macOS targets into an iOS app with Catalyst is still relevant. Could you please assist?

C
c128128 Feb 18, 2026

any news on this guys ?