5 ms·
Average iOS app build takes 30-45 minutes. You typically make 1-3 PRs a day, each of which need to be built. Let's say 3 PRs + 1 build after merging. That gives
by beeboobaa 3y ago
Average iOS app build takes 30-45 minutes. You typically make 1-3 PRs a day, each of which need to be built. Let's say 3 PRs + 1 build after merging. That gives you about a week of usage every month so you'll still need dedicated build hardware or pay for their overpriced cloud.
Thanks, Apple! Now go make your build tooling cross platform so we can just run it on a linux vm like everything else, and maybe stop gouging the people who are providing value for your platform?
- jsnell 3y ago> Average iOS app build takes 30-45 minutes. That sounds too awful to be true. Roughly how large are these average apps in terms of lines of code? I assume that's Swift rather than Objective-C?
- sspiff 3y agoNever going to happen. Apple has been fighting any efforts that attempt to support building for iOS on non-Mac hardware. I don't know why it matters so much, but it seems to matter to them. I doubt the little extra money they made back then from selling to developers would have mattered to them? But like all tech giants, Apple is now refocusing on services rather than software and devices, so perhaps forcing all Apple developers into their build service is part of that effort.
- beeboobaa 3y agoIt matters for them because their business strategy is utter and complete lock-in. If you don't want to submit to the apple religion they want you to gtfo.
- matthew_wilson 3y agoApple supports development on iPadOS now with swift playgrounds. This step moves closer to a iPadOS Xcode solution for build, test and distribution. This has minimal demand on the iPad as long as the network connection is good enough. Business acceptance of iPad is greater then that of Mac. Looking forward to WWDC2024.
- LeafItAlone 3y ago> Average iOS app build takes 30-45 minutes That seems high to me. Where does that come from? > You typically make 1-3 PRs a day, each of which need to be built. Let's say 3 PRs + 1 build after merging. That also seems like a lot, at least for an individual, which is what this seems? (to me) aimed at. I haven’t used it, but 25 hours seems within bounds for reasonable for a month’s usage.
- andrekandre 3y ago> That seems high to me. Where does that come from? it is high (and i agree too high imo), but many apps utilize a lot of 3rd party libraries that take a loooong time to compile (just off the top of my head, various "reactive" frameworks, realm, firebase related libs etc) you might ask why not deliver binary libs to cut down the time, well that used to be easy with obj-c/c dylibs but swift doesnt have a stable abi outside of apple libs, so every new swift update requires recompilation and swift package manager doesnt have much in the way of caching binaries for dependencies in a ci afaik
- tl 3y agoNot just compile, but download. In addition to dozens pure-iOS projects (internal apps deployed to users), I have a couple of react-native codebases to support Android. Xcode Cloud spends more time downloading npm packages than anything else including compiling. Unlike other CI tools I’ve used, there is no way to Xcode Cloud to maintain a dirty executor or specify dependencies to skip this step. In addition, downloading dependencies fails so often that CI fails a majority of builds which have to be re-run which consumes more minutes. I’m currently working with a client to convince them Jenkins on a Mac they own is cheaper and easier, working through the standard headaches of an IT department who supports thousands of iPhones and Windows machines but doesn’t want to support a single digit number of Mac just because Apple fights any attempt at cross-compiling from anything that’s not a Mac.
- orand 3y agoIf you're downloading dependencies on every build then you don't have a repeatable build.
- madeofpalk 3y agoIf you're doing 3 PRs a day, I think it's reasonable to start to pay for CI resources.
- maccard 3y ago> Now go make your build tooling cross platform so we can just run it on a linux vm like everything else I don't think they need to go as far as this. We already maintain windows CI agents on my team as we build C++ apps with MSVC. But crucially, our builds only take 10 minutes from cache, we don't want to pay for 24 hours usage.
- Kwpolska 3y agoYou can run Windows on commodity hardware. You can easily get a Windows VM billed by the minute. macOS is only licensed to run on Apple hardware (and will soon be impossible to run on a commodity x86 machine) and there are licensing restrictions that make macOS VMs on EC2 require a 24-hour minimum bill.
- maccard 3y ago> here are licensing restrictions that make macOS VMs on EC2 require a 24-hour minimum bill. Yeah, this is the killer. I don't mind paying $1/h for an M1 mac - our builds take about 10 minutes when cached, so paying $0.16 is fine. Even an hour's minimum would be totally fine - paying $60/mo to license it for 2h/day would be perfect. But, we're not paying $1/h with a 24h minimum every day. At that point, a Mac Mini is cheaper on month 1, so I have a mac mini on my desk.
- bsaul 3y ago30 minutes build, i assume you mean including running extensive unit tests ? Otherwise 30 min build is insanely large.
- andrekandre 3y agobuilding with full optimizations and lots of 3rd party libraries (esp if they are c++ or use lots of swift-generics w/type inference) can indeed take that long caused by lots of inlining, de-virtualization, static specialization, whole module optimization and static linking (or just linking in general)... a comparable clean build with debug flags (no optimization) might only take a few minutes with incremental builds taking a few seconds or so, i guess thats why its tolerated... the other thing is ci build pipelines are reaaallly slow so if you made the same build locally on your m1 pro its probably gonna take 1/4 the time as the ci (ime anyways)...many ci's are slow af....