Skip to main content

Focus on targets

Context#

In large Xcode projects that contain many targets and schemes, Xcode can be slow indexing the project. Moreover, the build system, which needs to resolve implicit dependencies, might take longer to do so because there are more Xcode objects to analyze. This is not ideal for developers' productivity and for that reason Tuist includes a command that allows users to focus on a specific target or set of targets.

tuist focus MyApp

The command generates and opens an Xcode workspace where the targets and schemes that are not directly related to MyApp are removed. Moreover, if the direct and transitive dependencies exist in the cache, Tuist replaces them with their pre-compiled version. Thanks to that developers can safely clean their Xcode environment because they'll only be building the target they are focusing on.

Arguments#

ArgumentShortDescriptionDefaultRequired
--path -pThe path to the directory that contains the manifest file.Current directoryNo
--no-open -nDon't open the project after generating it.FalseNo
--xcframeworks -xWhen passed it uses xcframeworks (simulator and device) from the cache instead of frameworks (only simulator).No
--no-cache -xIgnore cached targets, and use their sources instead.FalseNo
--profile -PThe name of the cache profile.No