Codemagic IOS build takes a long time to complete

1,427

There are some steps you can take in order to shorten your build time:

  1. As Mikhail said, make sure you don't have -v in your build arguments. Verbose mode can affect build time;
  2. Look over your dependencies and make sure all that you have there is all that you need. Too many useless dependencies can also have a toll on your build time;
  3. Separate testing and building. We have noticed that with tests Build step sometimes tends to also take longer time. Therefore create a separate workflow with testing and use 'run tests only'

Other reasons why building iOS can take such a long time are unfortunately out of our hands, hence Apple making building iOS apps much more complicated than Android and other type of restrictions.

Heres also a nice article about how companies battle the iOS build time: https://medium.com/@SkyscannerEng/hate-to-wait-how-skyscanner-used-module-caching-to-cut-app-build-speed-in-half-e906da1c077e

Share:
1,427
Rafael Honda
Author by

Rafael Honda

Updated on December 17, 2022

Comments

  • Rafael Honda
    Rafael Honda over 1 year

    I'm trying to setup my flutter app on Codemagic, but it takes about 40~50 minutes to build for IOS, the logs shows that is compiling files .c and .cc, there are a lot of those files been compiling. Is there a way to make the build faster? Am I missing some configuration?

    • Mikhail Tokarev
      Mikhail Tokarev about 4 years
      check iOS build arguments in Build Settings and remove -v option if it presents. Verbose mode significantly slow down iOS compilation.
    • Sam
      Sam almost 4 years
      @rafael i'm facing the same issue taking more than 45+min , no -v flags and unnecessary dependencies, any update on this
    • Rafael Honda
      Rafael Honda almost 4 years
      I'm using fastlane now. Couldn't quite make my build work on codemagic
  • Rafael Honda
    Rafael Honda about 4 years
    thanks for the help, I'm not quiet sure why my build is taking so long, I'm not building using verbose mode, my dependencies are ok, and I'm not running tests at the moment, I might switch to fastlane since I tested a build there and it took about 10 minutes to complete.