https://github.com/mugbug/flutter-fastlane-demo
π Example project with a basic Fastlane setup inside a Flutter project.
https://github.com/mugbug/flutter-fastlane-demo
fastlane flutter
Last synced: about 1 year ago
JSON representation
π Example project with a basic Fastlane setup inside a Flutter project.
- Host: GitHub
- URL: https://github.com/mugbug/flutter-fastlane-demo
- Owner: mugbug
- Created: 2020-08-29T13:31:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-16T17:33:03.000Z (over 3 years ago)
- Last Synced: 2025-04-30T22:15:22.711Z (about 1 year ago)
- Topics: fastlane, flutter
- Language: Dart
- Homepage:
- Size: 1.53 MB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
marp: true
theme: uncover
class: invert
---
# Flutter* + **Fastlane** = π
###### * or React Native or native iOS/Android ...
---
# Hi, I'm Pedro!
---
###### πΈ Generate screenshots for multiple device sizes
### π Build and upload a new version to the AppStore
##### π Handle generate and download certificates and profiles
### π€ Configure CI
#### βοΈ Build and upload a beta version to TestFlight
---
# _**fastlane**_ handles tedious tasks so you donβt have to.
---
# Setup Fastlane
```bash
$ cd ios
$ gem install bundler
$ bundle init
$ echo "gem 'fastlane'" >> Gemfile
$ bundle install
# ou simplesmente (nΓ£o recomendado)
# $ gem install fastlane
```
```bash
alias lane="bundle exec fastlane"
```
---
# $ **lane init**

---
# $ **lane init**
- Automatically create App ID on **Apple Developer Portal**
- Automatically create App on **Apple Store Connect**
- Configured **Appfile**
- Sample **Fastfile**
---
Appfile
```ruby
app_identifier("io.github.mugbug.fastlaneDemo")
apple_id("pedro.zaroni@dextra-sw.com")
itc_team_id("464910") # App Store Connect Team ID
team_id("JZ2QTNWLCN") # Developer Portal Team ID
```
Fastfile
```ruby
desc "Push a new beta build to TestFlight"
lane :beta do
build_app(workspace: "Runner.xcworkspace", scheme: "Runner")
upload_to_testflight
end
```
---
# $ **lane beta**
** ARCHIVE FAILED **
β error: "Runner" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'Runner' from project 'Runner')
---

---
# Avoid the **frustration** of managing code signing identities
Uncheck _Automatically manage signing_ =]
---

---
# Using _**match**_
# Using _**cert**_ and _**sigh**_
---
# Using _**match**_
Private keys + certificates => Github private repo
- Easy to setup new machines with only the repo access
- No need to create a profile for each team member
- Secure π
β οΈ _match_ requires to revoke existing certificates
---
# Using _**cert**_ and _**sigh**_
- _cert_ will make sure you have a valid certificate and its private key installed on the local machine
- _sigh_ will make sure you have a valid provisioning profile installed locally, that matches the installed certificate
###### Mainly used if you don't want to revoke existing certificates
---
To get started, create a **new private Git repo** and run:
# $ **lane match init**
###### https://codesigning.guide
###### Note: It's also possible to use Google Cloud or Amazon S3 to store the certificates/profiles
---
Matchfile
---
```ruby
# Repo where profiles and certs will be stored
git_url("git@github.com:mugbug/fastlane-demo-certs.git")
storage_mode("git")
# Apple Developer Portal username
username("mugbug@example.com")
```
---
Creating new certificate and profile
```ruby
# Fastfile
desc "Download provisioning profiles"
lane :rematch do
match(
type: "appstore", # or development/adhoc
# git_branch: "my-app",
username: "mugbug@example.com",
force: true, # enable to always refresh profiles
# readonly: true, # enable to prevent refreshes
)
end
```
---
# $ **lane rematch**
- Generate new certificate and import to local machine
- Create new provisioning profile for Bundle ID
- Setup Passphrase for Match storage
- Encrypt and upload certificate and profile to git repo
---

---
# Let's check Xcode's Signing & Capabilities
---
### Why use **match**?
- Full control over what happens
- Share a single code signing identity across the team
- Automatically repair broken and expired credentials
- Clean setup in minutes
- It just worksβ’
---
Sounds good, now let's try this again:
## $ **lane beta**
---

---
## Where to go from here?
- Version bump
- Screenshots
- Release notes
- Firebase App Distribution
- Slack message
- Integrate with any CI tool
- β -> beyond! π
https://docs.fastlane.tools
---
## fastlane.tools just saved you 40 minutes! π
---
References:
---
- [fastlane docs](https://docs.fastlane.tools)
- [Automating Your App's Release Process Using Fastlane](https://www.youtube.com/watch?v=scfOk5SgrKU)
- [A new approach to code signing](https://codesigning.guide)
- [Continuous delivery with Flutter](https://flutter.dev/docs/deployment/cd)
- [Marp gist](https://gist.github.com/yhatt/a7d33a306a87ff634df7bb96aab058b5)