If you have experience building apps for Apple platforms, like iOS, adding code to Tuist shouldn't be much different. You already know the most important elements, Foundation and Swift. There are two differences compared to developing apps that are worth mentioning:
- The interactions with CLIs happen through the terminal. The user executes Tuist, which performs the desired task, and then returns successfully or with an error code. During the execution, the user can be notified by sending output information to the standard output and standard error. There're no gestures, or graphical interactions, just the user intent.
- There's no runloop that keeps the process alive waiting for input,
like it happens in an iOS app when the app receives system or user events.
CLIs run in its process and finishes when the work is done.
Asynchronous work can be done using system APIs like
DispatchQueue, but need to make sure the process is running while the asynchronous work is being executed. Otherwise, the process will terminate the asynchronous work.
If you don't have any experience with Swift, we recommend Apple's official book. With it you'll also get familiar with the most used elements from the Foundation's API.
To start working on the project, we can follow the steps below:
- Clone the repository by running:
git clone [email protected]:tuist/tuist.git
- Ensure you have the NodeJS version specified in the
- Ensure you have the Ruby version specified in the
bundle installto automatically install the required dependencies
./fourier upto automatically format the code following Tuist's conventions
Xcode needs to be installed in your system. If not, you can install it from the macOS App Store. After the installation, open it once to accept some licenses and install some additional components.
You can also edit tuist with tuist by running
swift run tuist generate to generate the tuist project with the current changes.
If you want to use tuist version you have installed in the system, you might want to simply run
You can also leverage all the other tuist features that you know and love with the additional benefit of being able to validate your current changes on a complex project.
You can run Tuist from Xcode like you'd do from your terminal.
With the project opened in Xcode:
- Build the
- Edit the
In the Arguments tab inside the Run section specify the arguments that you'd like to pass to Tuist as shown in the screenshot below:
- Change the working directory in the options section to point to the directory that contains the project:
- Run the