This document provides information about getting started with Fastlane, an automation tool for beta deployments and releases of iOS and Android apps. It discusses installing Fastlane, configuring the Appfile and Fastfile, common Fastlane actions like match, cert, and sigh for code signing, and provides examples of using Fastlane with Flutter projects to build and deploy iOS apps.
2. What is fastlane
• fastlane is the easiest way to automate beta deployments
and releases for your iOS and Android apps. 🚀 It handles
all tedious tasks, like generating screenshots, dealing with
code signing, and releasing your application.
• Written in ruby
• macOS
• Google acquires Fastlane on 2017-01-18
3. Getting Started
• Install the latest Xcode command line tools
• xcode-select --install
• Install fastlane using
• sudo gem install fastlane -NV
• brew cask install fastlane
• Navigate to your iOS or Android app and run
• sudo fastlane init
• fastlane will automatically detect your project, and ask for any missing
information.
4. Getting Started guide for
Android
• Provide the package name for your application when
asked (e.g. io.fabric.yourapp)
• Press enter when asked for the path to your json secret
file
• Answer 'n' when asked if you plan on uploading info to
Google Play via fastlane (we can set this up later)
5. Getting Started guide for
Android
• Appfile - defines configuration information that is global to
your app
• Fastfile - defines the "lanes" that drive the behavior of
fastlane
7. Appfile
• https://docs.fastlane.tools/advanced/Appfile/
• The Appfile stores useful information that are used across
all fastlane tools like your Apple ID or the application
Bundle Identifier, to deploy your lanes faster and tailored
on your project needs.
• Android ex:
8. Appfile
• iOS ex:
• Different credentials for App Store Connect and the Apple
Developer Portal:
• different bundle identifiers per environment (i.e. beta, app
store)
9. Appfile
• If you want to access those values from within your
Fastfile use
11. Fastfile
• default_platform: fastlane test -> run ios lane.
• fastlane android test -> run android lane.
• platform: ios, android, MAC, include multiple
lane.
• desc: description your lane script.
12. Lane
• Multiple action in lane.
• Switch lane: the same platform or a
general lane outside of the platform.
• Passing Parameters
lane :(name) do
xxxx
end
fastlane [lane] key:value key2:value2
fastlane deploy submit:false build_number:24
17. match
• https://codesigning.guide/
• You have to manually renew and download the latest set
of provisioning profiles every time you add a new device or
a certificate expires
• Solution: Keep Your Keys In-Sync with Git
18. match
• Create git repository.
• fastlane match init
• Ensure you can fetch git repo by this path.
• Edit Matchfile file, app_identifier, username...
19. match
• 如果你的Apple Developer账户中有大量无效、过期或者Xcode自动生成的配置文件和证
书,可以使用match nuke命令撤销证书和配置文件,不必担心,App Store / TestFlight
中已有的应用程序仍然可以使用,推送证书也不在清理范围内。清除账户后,你就可以
从零开始,运行match生成证书和配置文件
• 生成憑證
fastlane match nuke development
fastlane match nuke distribution
fastlane match nuke enterprise
fastlane match development
fastlane match adhoc
fastlane match appstore
20. match
• how to use?
• fastlane match development
• fastlane match appstore
• --readonly
24. Manually
• You can always manually create and manage your
certificates and provisioning profiles using the Apple
Developer Portal. Make sure to store the private key (.p12)
of your certificates in a safe place, as they can't be
restored if you lose them.