Term · fastlane
fastlane is an open-source release automation tool for mobile apps, written in Ruby, supporting iOS and Android. In a script file in your project you define a number of "lanes", each made up of a sequence of actions, for example incrementing the build number, compiling and signing, uploading to TestFlight, submitting to the App Store, generating store screenshots, or sending a notification. You then run one command in the terminal and the whole sequence runs in order. It does not replace Xcode; it calls Xcode's command-line tools and Apple's APIs on your behalf. The official documentation states that it is officially supported on macOS and only partially supported on other systems.
How it relates to renting a remote Mac
fastlane calls Xcode when producing an iOS build, so it needs macOS just the same. It cannot free you from the Mac, but it lets you do less by hand on the Mac, which is especially useful for remote use:
- Less reliance on the graphical interface. How smooth the remote desktop feels depends on your local network line, and clicking through options one by one in Xcode is what suffers most. Once the process is in a script, you type one command in the terminal and read text output.
- No need to watch it. The command runs by itself on the machine. Combined with a terminal tool that keeps the session alive after you disconnect, closing the remote desktop does not affect it; see the guide to keeping long tasks running.
- Low cost of changing machines. The script travels with the code repository. On another Mac you pull the code, install the tools and get the same result, without depending on settings clicked into place on one particular machine.
For credentials, use an App Store Connect API key rather than giving your Apple Account password to a script. For installation and system requirements follow the official fastlane documentation. If you only release once or twice, there is no need to learn a tool for it; clicking through manually is fine.
FAQ
Can fastlane produce an iOS build on Windows?
No. Its support on other systems is partial, and the Xcode needed to compile iOS apps exists only for macOS. On Windows the most you can use are its Android-related features.
My cross-platform framework already has its own build command. Do I still need fastlane?
The framework's command usually only produces the build. The later steps, such as uploading to TestFlight, managing build numbers and submitting for review, can be chained on with fastlane or done by hand; let your release frequency decide.
Related
- What is fastlane match, and does it fix signing certificates stuck on one Mac?
- What is an App Store Connect API key, and why do build machines use one?
- What is a self-hosted runner?
- What is an Xcode archive (.xcarchive)?
- Coding on a remote Mac mini: remote desktop or terminal?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support