Moving a folder from inside Xcode doesn't actually move it

Question or problem

When I move a folder of my generated project inside Xcode, I expect the folder to be moved (as it is with a “regular” Xcode project).

Instead, it creates some sort of link with a back arrow icon. The folder is not physically moved in the file system. At the next project generation, the move is lost.

Note that I want to move the folder from one target’s sources to another target’s sources, which is maybe why it doesn’t work.

I have to work around this by moving folders from the Finder which is highly impractical compared to the Xcode Project Navigator.

Context

  • Tuist version: 4.45.1

You can press and hold the command key while moving the file in Xcode, this actually moves the file then as expected.

It does, thanks for the solution. It doesn’t change the target though, so I guess I still have to run tuist generate after that?

If those directories are captured in the target’s sources wildcard, you shouldn’t have to:

let target = Target(name: "MyApp", sources: ["Sources/App/**"])

With the above wildcard, Sources/App/**, if you drag an drop into the generated Xcode project directories under Sources/App, you don’t have to run tuist generate because it’ll lead to the same Xcode project.

Okay, I’m not sure if my Tuist project configuration allows that right now, I’ll have to tweak it. Thanks!

1 Like