Help with `tuist run` command, for macOS app

Question or problem

Not being able to use tuist run <Scheme/Runnable> to run a MacOS app…

Expectation

  • tuist run <AppName> should open the app in macOS. Just like when I run in the XCode.

Context

  • Tuist version: 4.38.2

Hi,
I am new to swift, iOS/MacOS dev, so hopefully it is not a silly question!
So I have the project all set up. Everything is correctly set up for macOS and works fine if I use XCode.

// the Project.swift
...
    targets: [
        .target(
            name: "MyTuist",
            destinations: .macOS,
            product: .app,
            bundleId: "io.tuist.MyTuist",
...

However, when I do tuist run <SchemeName> , It gives me an error that I need to choose one of the iOS destinations… However it is a macOS app and I want it to open the macOS build, just like XCode when I press the run button.

Could not find a suitable device for macOS. Did find iPhone 16 Pro (iOS 18.1), iPhone 16 Pro Max (iOS 18.1), iPhone 16 (iOS 18.1), iPhone 16 Plus (iOS 18.1), iPhone SE (3rd generation) (iOS 18.1), iPad Pro 11-inch (M4) (iOS 18.1), iPad Pro 13-inch (M4) (iOS 18.1), iPad Air 11-inch (M2) (iOS 18.1), iPad Air 13-inch (M2) (iOS 18.1), iPad mini (A17 Pro) (iOS 18.1), iPad (10th generation) (iOS 18.1), iPhone 16 Pro (iOS 18.0), iPhone 16 Pro Max (iOS 18.0), iPhone 16 (iOS 18.0), iPhone 16 Plus (iOS 18.0), iPhone SE (3rd generation) (iOS 18.0), iPhone 13 Pro (iOS 18.0), iPad Pro 11-inch (M4) (iOS 18.0), iPad Pro 13-inch (M4) (iOS 18.0), iPad Air 11-inch (M2) (iOS 18.0), iPad Air 13-inch (M2) (iOS 18.0), iPad (10th generation) (iOS 18.0), iPad mini (6th generation) (iOS 18.0), iPhone 16 Pro (iOS 18.2), iPhone 16 Pro Max (iOS 18.2), iPhone 16 (iOS 18.2), iPhone 16 Plus (iOS 18.2), iPhone SE (3rd generation) (iOS 18.2), iPad Pro 11-inch (M4) (iOS 18.2), iPad Pro 13-inch (M4) (iOS 18.2), iPad Air 11-inch (M2) (iOS 18.2), iPad Air 13-inch (M2) (iOS 18.2), iPad mini (A17 Pro) (iOS 18.2), iPad (10th generation) (iOS 18.2)
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose

Reproduction (mandatory for problems)

  • Simply use tuist init AppName, tuist generate, tuist build then tuist run <AppName> with the example dumped starter app.
  • I am using an Intel Mac if that makes any difference?

Thanks

1 Like

Hi @Alch3m1st, and welcome to the Tuist community forum :wave:

It’s not a silly question at all. With the steps you describe, I’d expect Tuist to do what you describe.

The CLI component that contains the business logic to run the app might be looking for a valid simulator destination to run the app, which is not necessary in the case of macOS apps, where the host and the target platforms are the same, macOS.

If you are up for it, you can open a PR. I recommend the following steps:

  1. Add an acceptance test to reproduce the issue.
  2. Fix the issue and make sure the acceptance test passes.
  3. Add or adjust existing unit tests accordingly.

Alternatively, a PR with the acceptance test failing or an issue on the repository would be great. That way any contributor can take it and implement a fix.

1 Like

Hi @pepicrft ! Thanks for the clarification!

I will try to start debugging and then raise an issue or just PR it :slight_smile:

1 Like