JoBins Engineering

JoBins Engineering

Deployment Automation, Saving time and automating tasks : IOS beta deployment

Deployment Automation, Saving time and automating tasks : IOS beta deployment

ios Beta Deployment Automation using fastlane

Sandeep Bist's photo
Sandeep Bist
·Apr 29, 2022·

4 min read

Subscribe to our newsletter and never miss any upcoming articles

Play this article

Although automation seems complicated for setting, once set up it runs quietly in the background drastically increasing efficiency by saving hours each day.

Automation saves costs, eliminates repetitive boring tasks, and allows creative minds to focus on higher-value activities. Here we are discussing application deployment automation. Developer hours are crucial and cost-intensive to any company.

Basically, companies and businesses can save money in various forms with automation

  • They can save labor costs
  • Time loss
  • Removing the bottlenecks
  • Opportunity costs

In addition to coding an essential part of iOS development is to work effectively with the apple developer portal and App Store Connect. There are many tasks related to the Apple ecosystem, such as registering application code signing beta testing, and so on are time-consuming

A typical iOS app release day involves so many steps involved in Distributing the app into users' hands

  • Thoroughly testing the releasing app
  • Take screenshots of the features in all the languages and devices you support
  • Signing issues
  • Preparing push certificate
  • Uploading build
  • Processing
  • Submit

image.png

This is a time-consuming and repetitive process.

So here we need automation to rescue developers from the repetitive time-consuming processes. In software engineering, CI/CD or CICD is the combined practice of continuous integration (CI) and (more often) continuous delivery or (less often) continuous deployment (CD). CI/CD bridges the gaps between development and operation activities and teams by enforcing automation in the building, testing, and deployment of applications. CI/CD services compile the incremental code changes made by developers, then link and package them into software deliverables.

Automated tests verify the software functionality, and automated deployment services deliver them to end-users. Continuous Delivery (CD) is the process of automating the build using some external tools/software, which reduces manual developer effort to create the build so you can share the build reliably in no time. Deployment to production happens manually based on the business decision on when to do so.

The aim is to increase early defect discovery, increase productivity, and provide faster release cycles. The process contrasts with traditional methods where a collection of software updates were integrated into one large batch before deploying the newer version. Modern-day practices involve continuous development, continuous testing, continuous integration, continuous deployment, and continuous monitoring of software applications throughout their development life cycle. The CI/CD practice, or CI/CD pipeline, forms the backbone of modern-day DevOps operations.

image.png

There are various CI/CD tools for mobile app projects such as

  • Codemagic
  • Fastlane
  • Bitrise
  • AppCircle
  • Gitlab CI
  • Jenkins
  • GitHub Actions etc

image.png

Here we will discuss ios beta deployment using "fastlane"

Fastlane is an open-source CD tool aimed at simplifying Android and iOS deployment to automate every aspect of your development and release workflow. Fastlane lets you configure lanes to support your team’s deployment workflows. Use a single command to run a lane.

Fastlane supports all major CI Platforms like Bitrise, Jenkins, CircleCI, Travis, GitLab CI, Azure DevOps, etc. Fastlane is a ruby gem, hence runs on the local machine, and no server is needed.

Installing Fastlane

Use the following commands to install "fastlane"

Using Homebrew

brew install fastlane

Verify fastlane version

fastlane -v

Initialize Fastlane tool within Project

Navigate to your iOS project directory and run the below command

fastlane init

This allows you to choose setup options regarding which process to be automated which in turn creates a folder named fastlane containing Fastfile, Appfile, Gemfile etc.

  • Fastfile is the main file that contains instructions, steps, and actions to automate the process called lanes.

Check that app_identifier in [project]/ios/fastlane/Appfile also matches Info.plist’s bundle identifier.

Fill in apple_id, itc_team_id, team_id with your respective account info.

For test flight deployment of ios app

fastlane beta

This command will perform the following actions and build your app to testflight.

image.png

Note: If you want to upload builds to App Store Connect (actions upload_to_app_store and deliver) or TestFlight (actions upload_to_testflight, pilot, or testflight) from your CI machine, you may generate an application specific password

  • Visit your apple account
  • Generate a new application-specific password
  • Provide the application-specific password using the environment variable FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD
  • This will supply the application-specific password to iTMSTransporter, the tool used by those actions to perform the upload.

We will discuss fastlane in detail in the next article.

 
Share this