iOS CI Workflow
Here is a video that explains the setup of the iOS CI workflow.
Getting Started
The CI workflow is defined in .github/workflows/ios-deploy-testflight.yml
.
It works with Fastlane and uses the fastlane-match action to manage the code signing certificates and provisioning profiles. You can find the Fastlane documentation here.
Before you can use it, you need to set up Fastlane and add the required secrets to your GitHub repository.
Adjust the Appfile
, Fastfile
and Matchfile
to your needs. You can find them in the fastlane
folder.
Match
Match is a tool that allows you to share certificates and provisioning profiles between members of a team. It stores the certificates and profiles in a git repository.
The documentation can be found here.
App Store Connect API Key
First you need to create an API Key in App Store Connect. You can find the documentation here.
Here are the steps
1. Select Users and Access, Integrations tab and then select the App Store Connect API.
2. Make sure the Team Keys tab is selected.
3. Click Generate API Key or the Add (+) button.
4. Enter a name for the key. The name is for your reference only and isn’t part of the key itself.
5. Under Access, select the role for the key.
6. Click Generate.
7. The new key’s name, key ID, a download link, and other information appears on the page.
Secrets
Add the following secrets to your GitHub repository. You can find them in the repository settings under Secrets and variables
. Choose 'Actions' and add the secrets.
APP_STORE_CONNECT_API_KEY_ISSUER_ID
: Issuer ID on APP Store Connect API pageAPP_STORE_CONNECT_API_KEY_KEY
: The actual Key base64 encoded- use
cat <myfile>.p8 | base64
to get the base64 encoded key
- use
APP_STORE_CONNECT_API_KEY_KEY_ID
: Key ID in the tableMATCH_PASSWORD
: The password that you set for your match repositoryMATCH_GIT_BASIC_AUTHORIZATION
: Create a personal access token1. Go to your GitHub account settings
2. Click on Developer settings
3. Personal access tokens
4. Fine-grained tokesn
5. Choose actions and contents permissions
6. Generate token
Fastfile
Update the name of the app in the Fastfile
to match your app name. I highlighted it with TODO
comments.
Matchfile
- Update the
git_url
to match your repository. - Update the
app_identifier
to match your app identifier. - Update the
username
to match your Apple ID.
I highlighted it with TODO
comments.
Appfile
- Update the
app_identifier
to match your app identifier. - Update the
apple_id
to match your Apple ID. - Update the
team_id
to match your Developer Portal Team ID - Update the
itc_team_id
to match your App Store Connect Team ID