text
stringlengths
1
474
manifest.json, which is produced by flutter create in the web directory.PWA support remains a work in progress,
so please give us feedback if you see something that doesn’t look right.
<topic_end>
<topic_start>Continuous delivery with Flutter
Follow continuous delivery best practices with Flutter to make sure your
application is delivered to your beta testers and validated on a frequent basis
without resorting to manual workflows.<topic_end>
<topic_start>
CI/CD Options
There are a number of continuous integration (CI) and continuous delivery (CD)
options available to help automate the delivery of your application.<topic_end>
<topic_start>
All-in-one options with built-in Flutter functionality
<topic_end>
<topic_start>
Integrating fastlane with existing workflows
You can use fastlane with the following tooling:This guide shows how to set up fastlane and then integrate it with
your existing testing and continuous integration (CI) workflows.
For more information, see “Integrating fastlane with existing workflow”.<topic_end>
<topic_start>
fastlane
fastlane is an open-source tool suite to automate releases and deployments
for your app.<topic_end>
<topic_start>
Local setup
It’s recommended that you test the build and deployment process locally before
migrating to a cloud-based system. You could also choose to perform continuous
delivery from a local machine. On iOS, follow the
fastlane iOS beta deployment guide.
You can specify the archive path to avoid rebuilding the project. For example:You’re now ready to perform deployments locally or migrate the deployment
process to a continuous integration (CI) system.<topic_end>
<topic_start>
Running deployment locally
<topic_end>
<topic_start>
Cloud build and deploy setup
First, follow the local setup section described in ‘Local setup’ to make sure
the process works before migrating onto a cloud system like Travis.The main thing to consider is that since cloud instances are ephemeral and
untrusted, you won’t be leaving your credentials like your Play Store service
account JSON or your iTunes distribution certificate on the server.Continuous Integration (CI) systems generally support encrypted environment
variables to store private data. You can pass these environment variables
using --dart-define MY_VAR=MY_VALUE while building the app.Take precaution not to re-echo those variable values back onto the console in
your test scripts. Those variables are also not available in pull requests
until they’re merged to ensure that malicious actors cannot create a pull
request that prints these secrets out. Be careful with interactions with these
secrets in pull requests that you accept and merge.<topic_end>
<topic_start>
Xcode Cloud
Xcode Cloud is a continuous integration and delivery service for building,
testing, and distributing apps and frameworks for Apple platforms.<topic_end>
<topic_start>
Requirements
<topic_end>
<topic_start>
Custom build script
Xcode Cloud recognizes custom build scripts that can be
used to perform additional tasks at a designated time. It also includes a set
of predefined environment variables, such as $CI_WORKSPACE, which is the
location of your cloned repository.info Note
The temporary build environment that Xcode Cloud uses includes tools that are
part of macOS and Xcode—for example, Python—and additionally Homebrew to
support installing third-party dependencies and tools.<topic_end>
<topic_start>Post-clone script
Leverage the post-clone custom build script that runs after
Xcode Cloud clones your Git repository using the following instructions:Create a file at ios/ci_scripts/ci_post_clone.sh and add the content below.
<code_start>#!/bin/sh
# Fail this script if any subcommand fails.
set -e
# The default execution directory of this script is the ci_scripts directory.
cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo.
# Install Flutter using git.
git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"
# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
flutter precache --ios
# Install Flutter dependencies.
flutter pub get
# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods
# Install CocoaPods dependencies.
cd ios && pod install # run `pod install` in the `ios` directory.
exit 0<code_end>
This file should be added to your git repository and marked as executable.<topic_end>
<topic_start>
Workflow configuration
An Xcode Cloud workflow defines the steps performed in the CI/CD process
when your workflow is triggered.info Note
This requires that your project is already initialized with Git
and linked to a remote repository.To create a new workflow in Xcode, use the following instructions:Choose Product > Xcode Cloud > Create Workflow to open the
Create Workflow sheet.Select the product (app) that the workflow should be attached to, then click
the Next button.The next sheet displays an overview of the default workflow provided by Xcode,
and can be customized by clicking the Edit Workflow button.<topic_end>
<topic_start>Branch changes
By default Xcode suggests the Branch Changes condition that starts a new build
for every change to your Git repository’s default branch.For your app’s iOS variant, it’s reasonable that you would want Xcode Cloud to
trigger your workflow after you’ve made changes to your flutter packages, or
modified either the Dart or iOS source files within the lib\ and ios\
directories.This can be achieved by using the following Files and Folders conditions:<topic_end>
<topic_start>