

Now, let’s take the open-source project we spoke about and build it using both the build systems.ĭo you see the difference? 0.991sec! (4.223 sec for legacy & 3.232 sec for the new system). Projects with legacy codebases and lots of dependencies would a great target. Although this would not affect sample projects heavily, it will definitely have a drastic impact on a heavy-duty codebase. In order to see its actual implication, you should try building the project using both (legacy/ new) build systems and contrast & compare build times. To use the new build system you can enable it in the File menu and select ‘Workspace Settings’ (or ‘Project Settings’ if you aren’t using a Workspace). The major goal of this new build system is to reduce the overall build time. But in Xcode 10, it is being used by default, and is written from scratch in Swift. Xcode 9 introduced a new build system (I think it is called XCBuild internally), which was only in its preview version. Now that we’re done with the prerequisite, let’s get into actually tweaking the settings to improve the performance of build generation. The derived data including the Build folder (Command + Shift + K) should be cleaned before building the project. Note 2: In order to have the correct build time displayed, please make sure to deep clean your project. Note 1: If Xcode doesn’t display it for some reason, then try restarting it Now after you build your project, Xcode’s bar should display the build time like this: Simply copy-paste and run this command in the terminal: ‘defaults write .Xcode ShowBuildOperationDuration -bool YES’Ģ.

By default, Xcode doesn’t display the build time, so we’ll have to enable it.ġ. Prerequisite – Show Build Timeįoremost, we need to know how much time Xcode takes to build our project. Without further ado, let’s jump straight into the options. This section shares the results of these experiments. Real-time Effect – I have chosen this awesome open-source project and have run the suggested optimization(s) against it.Action Points – Outlines specific actions you can perform in Xcode.Hence, in this article, I will try to list down all possible ways in which we can tweak our iOS project to elevate the performance of Xcode build.

Reducing build times is super helpful for developers especially when you are working on decades-old legacy codebases with tons of dependencies. I chose this topic since I haven’t come across any blog or article that has an exhaustive list of ways to fasten up an Xcode build. improve build performance, then you are at the right place. If you are looking for ways to reduce your Xcode project’s build time i.e. An iOS engineer who has worked with multiple startups across different domains.
