Post building an app, all you have to do is submit it to the stores to make it available to the world. How hard could that be, right?
Capturing all the necessary dimensions of a screenshot, adding your app to App Store Connect and Google Play Console, uploading your binary and metadata and other mindless work!
What is fastlane?
We can simply describe fastlane as the easiest way to automate building and release your iOS and Android apps on the stores.
Fastlane is essentially a Ruby script, and it has a thing called a lane which takes in a series of commands
Let’s see how we make the manual build, as well as how fastlane is making it easier for us!
If we talk about iOS manual flow;
From a manual prospective, the first thing you would do is increment your build number. It’s a very easy step, you just go into Xcode and move the number up one. The next thing is to install the dependencies at the CocoaPods by running the command
pod install, only if you’re using it.
The next thing occurs is building an IPA, and then would have to go into the Apple Developer Console and will have to grab your latest production provisioning profile and latest production certificate to create a sealed IPA. It is the same as code signing, used to prevent middleman or some sort of parader from taking your app and making alternations to it.
After that’s done, you would upload the sealed IPA and captured screenshots to the app store. And go on to the App Store Connect, formerly known as iTunes connect to fill out metadata such as description, ratings, name, instructions, and information for testers etc. and then submitted for review.
So, this is a lot of steps that you typically have to do for the manual building. However, with fastlane all this is automated through essential commands. You can refer to the below image to see the difference.
Fastlane essentially automates each step that really helps to save the development team a lot of time. The one thing I would note about these fascinating commands, that all these works for React Native except the
snap command does is would automatically capture screenshot for all the different sizes of your app.
Fortunately, Apple has made significant strides in the past year to make this process a lot easier. So, instead of taking screenshots for every different iPhone version, you can upload screenshots for 5.5-inch iPhone screen and Apple will essentially just resize the images for another phones.
Again with fastlane, the first thing it does is incrementing the build number and installs CocoaPods, and then it’s going to build an IPA and the sealed IPA.
The sealed IPA is getting build through the certificates and provisioning profile from the private GitHub repo during the build process.
Fastlane has a tool called match that automates this process. So, if you don't have a certificate or provisioning profile generated currently, match will help you with that and will create a brand new one for you and upload those to the repo.
Once done with all the sealed IPA process, going down to the next step of uploading the metadata and screenshots to the App Store. Fastlane will go to your local folder on your computer to grab the screenshot, metadata and upload all automatically to the App Store Connect and submit all of it for the review.
All of it will be done automatically, which is really amazing.
That’s all how fastlane works with iOS. I’ll talk about fastlane with android in the next part. :)