As projects grow, building times can be problematic. However, there are several tweaks you can create for Xcode that can reduce the amount of time it takes for the buildings to complete without additional work.
Increase Line Count :
By default, Xcode typically uses the same number of threads as the number of cores in the machine's CPU. However, you can dramatically reduce the construction times – in some cases by as much as 30% – by increasing the thread count beyond the default setting. This utilizes some processor's ability to thread or simulate multiple cores. Keep in mind that you may need to experiment to determine if there are decreasing returns for parallelized buildings with your code, and then adjust the thread accordingly.
Enable New Building System:
Apple's "New Build System" was written entirely in Swift and was developed for overall performance and dependency management improvements. Please note that while New Build System is available in Xcode 9+, it must be enabled in Xcode under Project / Workplace Settings since "Standard Build" will be the default option. Alternatively, New Build System can be activated via command line (details connected below).
You can find more details and instructions to enable the new building here:
Xcode New Building System for Speedy Swift Builds
Tweak iOS Simulator:
The Apple iOS Test Simulator lets you test across different software and hardware combinations (but only from a Mac). By using Physical Size or Pixel Accurate Window sizes, you can reduce both the size of the tests and the time it takes for them to complete. Finally, these configuration changes use less resources and help prevent tests from reducing while simulating pixel-perfect iPhone browsers that nobody wants to see.
You can find configuration instructions here: Adjust the Xcode iPhone Simulator scale and size
Use Parallelized Buildings:
Parallelized buildings can reduce total Xcode build times by building components of the app that do not depend on each other at the same time. For projects with many minor addictions that can be easily run in parallel, this can save significant time savings. Gains will of course depend on how your code is written, but it's worth testing since parallelized buildings are not enabled by default. You can enable parallel buildings by editing the Xcode form and checking "Parallel Build" in the building activity of the form.
You can find more details about using parallelized buildings here: When should I check "Parallellize build" for an Xcode form?
Turn on collection time context:
Building time summary allows to report the construction times of each piece of the Xcode building. In other words, building summary can help you identify the parts of the building that affect building times and further optimize the building process for overall gains. Although it's not a solution in itself, insights that build time summaries can be useful when prioritizing your work as you try to optimize your construction times.
Bigger Construction Machines:
This is not technically an Xcode tweak, but larger construction machines have an extensive impact when trying to increase the speed of the buildings. More computing power translates only into faster execution of processes and builds. Our test shows that moving from a dual-core Mac mini to a 1
Of course, these are just a few suggestions you can use to speed up your Xcode building times. The following resources may provide additional information and suggestions for improving the Xcode building times.
Quick Code Compilation Time Optimizer
50% Waiting Time Shake from IOS Edit-Build Test Cycle
8 Tips for Speed Upgrade your Swift Build and Compile Times in Xcode
How to Build Better Apps with Xcode 9 and IOS 11