Tuist Tutorial for Xcode | raywenderlich.com

Learn how to use Tuist to create and manage complex Xcode projects and workspaces on-the-fly.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/24508362-tuist-tutorial-for-xcode

This looked interesting, however the first step, out of the box doesn’t work:

bash <(curl -Ls https://install.tuist.io)

The error is:

bash <(curl -Ls https://install.tuist.io) 
==> Downloading tuistenv...
==> Unzipping tuistenv...
==> Installing tuistenv...
mkdir: /usr/local/bin/: Permission denied

Trying with sudo

sudo bash <(curl -Ls https://install.tuist.io) 
bash: /dev/fd/11: Bad file descriptor
rcohen@Stephanies-MacBook-Pro starter % (23) Failed writing body

A little guidance would be greatly appreciated. Thx.

Hi @rcohen.

This seems like a directory permission problem based on where Tuist is trying to install itself vs an issue with the tool itself. Have you tried ensuring the location usr/local/bin exists? If you use a command line package manager like Homebrew, then this directory should already be present. But based on the error message you posted above, it looks like the directory may not exist?

If it does exist, have you made sure your user has write permissions to it? Running a command to ensure your user has the correct permissions may help:

sudo chown -R $(whoami) /usr/local

Hi, thank you so much for this tutorial. I am facing a very strange issue. Once I try to use the Settings in the Project.swift file I start getting compiler errors, as the compiler doesn’t know what Settings(debug:, release:, defaultSettings:) is, or Path() and other objects. It does recognize the Project() object, but not the others… which got me stuck pretty much from the middle of the tutorial on. I was looking at the documentation and since I am using v2.1.1, the commands from the tutorial seem to be accurate. Any idea about what could be my issue here? Thanks in advance

Hi @paulobfsilva. Thanks for reading the article and pointing this out! Since that article was written, Tuist has released a major update. The article was written with version 1.34.0. It appears with the release of 2.x, the API has significantly changed for the Settings object and some other parts of the Project file. These are breaking changes. I will take a look to see how extensive it will be to update the article with the new version (or if this will require a new tutorial!). In the meantime, you can use the 1.x version of Tuist if you want to continue with the current article.

The process to download and use the 1.x version of Tuist can be found here. Basically, it should be as simple as running the following command inside the project directory from Terminal:

tuist install 1.34.0

Again, thanks for your feedback, and best of luck!

1 Like

Thank you so much for the time and effort you put into this tutorial. It is immensily valuable when working with apps at scale, where the codebase is getting really out of hand and the compile times start to grow exponentially. I was looking at the API documentation for Settings and I did spot some differences, but it didn’t seem to be a whole lot different. I will give it a try with v1.34.0. Thanks!

I did the downgrade, but then I run into this issue: swift - Tuist generate fails with Xcode 13 - Stack Overflow

version 1.51.0 seems to be the sweet spot here. Version 1.34 won’t work for Xcode 13

Ah! I bet they fixed the Xcode 13 issues in some of the later 1.x releases. Thanks for letting me know!

Hi, tuist has released a new version 3.x of their API. It would be great to update the tutorial or create a new tutorial altogether, specially if the cache feature could be included in the tutorial. If you see any value on that, it would be great! Let me know if you need anything from me, would love to help and see this published!