As a big fan of automation, I rarely decline an opportunity to setup a CI/CD flow for a new project, be it a React-stack website (with or without SSR), or a mobile application (native or cross-platform).
A web application, be it based on Node.js, or PHP, or any other language, can be relatively straightforward to set up a CI/CD flow for (thanks to a widely available Unix-based VPS and cloud services).
An iOS application – not as much.
Out of the many different ways to handle CI/CD for iOS apps, I’ve recently tried out bitrise, and I think it’s a pretty good solution. If you’re also using bitrise, and also stuck at the “Xcode Archive & Export for iOS” step like I was, then this post is for you!
In fact, if not for this consistent hanging (timeout after 600 seconds) issue during xcodebuild that made me hate myself and question my identity for some 48 hours, I’d probably love the bitrise platform a bit more 😉 but hey, at least i’m still getting my builds for free :p
Poor jokes aside, this post discusses what I’ve done to get through the timeout issue on my bitrise
deploy workflow builds. Before going further, I’d love to give props to this SO answer, which brought me to a realization that I could actually set the
compileBitcode option on the bitrise
deploy workflow step, too (somehow, the bitrise documentation doesn’t really menion this ‘bit’, so I figured it’d help to post it up here):
TL;DR: make sure the
Rebuild from bitcode option is set to
no, which is equivalent to setting
false in the
export_options.plist file (as mentioned in the SO answer), and your final xcodebuild step may complete successfully!
- It’s not guaranteed this will work for future versions of the bitrise workflow steps (the bitrise team may fix this eventually), nor will it magically work for all the various different environments out there (I’m on
Xcode 10.2.x, on macOS 10.14 (Mojave)as I write this post, and it worked for me).
- I’m also not sure why this happened in the first place, but considering the very limited info given in the error log (when it hanged), I’m not surprised the “easy way out” is to just disable the entire
compileBitcodefeature (as opposed to setting it on, finding out why it fails, then solving it) – but if any of you can shed more light here, I’d much appreciate your feedback!