Overview
We all know the famous sentence “Eat Repeat…Eat Repeat” but now in the development team we can say “CODE RUN DEPLOY REPEAT…CODE RUN DEPLOY REPEAT”
To begin with What is Fastlane and Why should we use Fastlane? I think this type of question arises when we are getting any new topic to adopt. So here I’ll try to explain about Fastlane.
Let’s get started with What is Fastlane?
Just think about the word `Fastlane` is the Fast-Lane now you can understand that Fast is taking a time that is less than the manual process and lane is the roadmap/workflow so in simple wording the easiest and fastest way to complete your roadmap/workflow for deployment.
In another technical team, Fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. Fastlane, maintained by Google, is a Continuous Delivery(CD) tool that comes with a wide variety of base tools, including testing, deployment, and many more.
Why Fastlane?
- Save hours every time you push a new release to the store or beta testing service
- Integrates with all your existing tools and services (more than 400 integrations)
- 100% open source under the MIT license
- Easy setup assistant to get started in a few minutes
- Runs on your machine, it’s your app, and your data
- Integrates with all major CI systems
- Supports iOS, Mac, and Android apps
- Extend and customize Fastlane to fit your needs, you’re not dependent on anyone
- Never remember any commands anymore, just Fastlane
- Deploy from any computer, including a CI server
Olden days, we had to create our own solution or list multiple scripts from folks in order to be able to automate the process of building and deploying our projects. That is why Fastlane is so useful, you will find everything you need in one place, with a community to help you if necessary and a simple and embracing configuration that fits your needs.
Getting started with Fastlane for iOS
Installation:
Installing the latest Xcode command-line tools:
xcode-select --install
Installing Fastlane:
# Using RubyGems sudo gem install fastlane OR # Alternatively using Homebrew brew install fastlane
Set up environment variables:
export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
NOTE: In particular, having your locale not set to a UTF-8 locale will cause issues with building and uploading your build
Setting up fastlane:
NOTE: Make sure you have the correct Xcode project select
fastlane init
NOTE: If you want to create your first app on your App Store Connect account, you need to set the developer name (company_name) with PRODUCE_COMPANY_NAME environment variable:
PRODUCE_COMPANY_NAME="YOUR COMPANY NAME" fastlane init
To get more information related to “company name” Click here.
Currently, For swift language setup is still in beta but if you want to setup Fastlane.swift
Features of the Fastlane:
- Automate Screenshots – Automatically generate localized screenshots for the app store
- Beta Deployment – Easily distribute beta builds to testers
- App Store Deployment – Publish a new release to the app store in a few seconds
- Code Signing – Identities and profiles in your own private, encrypted git repository
How Fastlane Works in the Release Process:
Fastlane takes care of all the magic for you. We just need to create a Fastfile file in our repository. Here’s one that defines the beta or App Store release process:
lane :beta do #Fastlane Beta increment_build_number #increment build number build_app #build your app upload_to_testflight #upload to TestFlight end lane :release do #Fastlane AppStore capture_screenshots #capture screenshots build_app #build your app upload_to_app_store #upload to store slack #notify slack end
Conclusion
In the beginning, I used a famous example like that uses Fastlane to make it very easy for developers to deploy any application in-app store. Fastlane empowers app delivery through automation and takes off the burden of app delivery for iOS developers by a one-click solution for creating the certificate, syncing certificate, building application, packaging application, and much more.We are using Faslane Architecture to save development time, so what are you waiting for let’s get started with Fastlane. For projects contact us.