Intro to Fastlane for iOS - the Why
Introduction
I’m sure you’ve heard about Fastlane by now. If you haven’t, this will be a very weird blogpost for you. It’s the industry standard for automating iOS development tasks. It’s a collection of tools that help you automate the most tedious tasks in iOS development. And it’s a personal favorite of mine.
However, just because you’ve heard of it, doesn’t mean that you feel comfortable using it. Learning a new thing is daunting, and Fastlane is, for now at least, written in syntax that might be new to you as well - Ruby.
But fear not! In the following few weeks, we’re going to go from zero to hero when it comes to Fastlane, and automate all the things!
But first, why would we even want to ?
Why Automate?
Consistency
Humans are not good at doing the same thing over and over again. We get bored, we get tired, we get distracted. And when we do, we make mistakes. And mistakes are bad. They can lead to bugs, crashes, and even worse, security vulnerabilities.
Also, when you have a team of developers, you want them to work in the same way. You want them to follow the same steps, to use the same tools, to have the same environment. This is crucial for the maintainability of your codebase.
Lastly, and perhaps even more importantly, there are some tasks that are just too boring to do manually. You don’t want to spend your time doing things that a computer can do for you. You want to spend your time writing code, solving problems, and creating value.
Speed
Computers are fast. They can do things in milliseconds that would take you hours. And they can do them 24/7. So why not let them?
By automating the bumping of the version of your SPM package, you can save yourself a few minutes every time you release a new version. By automating the generation of screenshots for the App Store, you can save yourself a few hours every time you release a new app.
Laziness
I’m a lazy person. I don’t like doing things that I don’t have to do. And I’m sure you are too. So let the computer do the boring stuff for you, and you can focus on the fun stuff.
Why Fastlane?
It’s the best
Fastlane is the best tool for automating iOS development tasks. It’s used by thousands of developers around the world, and it’s the de facto standard for automating iOS development tasks. It is absolutely the industry standard, and regardless of which company you work for, and whatever CI/CD provider they use, you will find Fastlane there.
It’s constantly updated
Fastlane is constantly updated with new features, bug fixes, and improvements. It’s maintained by a team of dedicated developers who are always looking for ways to make it better. And it’s open source, so you can contribute to it as well! But what that means for us, is that we don’t need to worry about it going the way that Cocoapods did, and we don’t have to worry that the new Xcode version will brick it. And if it does, you can count on their incredible support to fix it.
It’s easy to use
Syntax is a matter of opinion, and I’m sure that some of you will disagree with me on this one, but I find Fastlane’s syntax to be very easy to use. It’s very readable, and it’s very easy to understand what’s going on. And if you don’t understand something, you can always look it up in the documentation. The Ruby syntax is very human readable to me, and with very minimal setup you can have VSCode be very helpful in your Fastlane journey.
But even nicer than that, it has everything you would ever need when just starting out already built into it. Do you need to run your tests? use scan
.do you need to manage certificates? there’s match
. Do you need to upload your app to TestFlight? there’s pilot
. Do you need to upload your app to the App Store? there’s deliver
. And so on, and so on. You don’t need to write it all from scratch!
Conclusion
So, in conclusion, we’re going to learn Fastlane because it’s the best tool for automating iOS development tasks. It’s constantly updated, easy to use, and has everything you would ever need already built into it. And it’s going to save you time, make your codebase more maintainable, and make your life easier. I’m excited about it! Are you? 🚀