0. Distribution Setup
First, create the apps on their respective distribution portals, and get the API keys to allow the CI to authenticate with them.
(Complete instructions for retrieving the keys can also be found here https://docs.fastlane.tools/actions/supply/)
iOS
-
Create the new app on Appstore Connect.
<aside>
💡 You can create the app using the following fastlane command
fastlane produce -u user@apple.com -a app.identifier
</aside>
-
Obtain an Appstore Connect API Key
- Visit https://appstoreconnect.apple.com/access/api
- Select App Store Connect API on the left panel, under Key Type.
- Click Request Access and select Submit on the new popup.
- Click Generate API Key.
- Name can be mobile-app or anything else.
- The Access role must be set to App Manager.
- Click Download API Key to obtain the
.p8 file (don't change the file name).
- Copy the Issuer ID from the top of the page.
- Send both the API Key file and Issuer ID back to us.
-
Save the API Key in 1password.
Android
- Create the Firebase project and Enable App Distribution.
- Obtain a PlayStore Console API Key
- Open the Google Play Console
- Click Account Details, and note the Developer Account ID listed there
- Click Setup → API access
- Click the Create new service account button
- Follow the Google Cloud Platform link in the dialog, which opens a new tab/window:
- Click the CREATE SERVICE ACCOUNT button at the top of the Google Cloud Platform Console
- Verify that you are on the correct Google Cloud Platform Project by looking for the Developer Account ID from earlier within the light gray text in the second input, preceding
.iam.gserviceaccount.com. If not, open the picker in the top navigation bar, and find the one with the ID that contains it.
- Provide a
Service account name and click Create (example name: “PlayStore Release CI”). ****
- Click Select a role, then find and select Service Account User, and proceed
- Click the Done button
- Click on the Actions vertical three-dot icon of the service account you just created
- Select Manage keys on the menu
- Click ADD KEY -> Create New Key
- Make sure JSON is selected as the
Key type, and click CREATE
- Save the file on your computer when prompted and remember where it was saved to
- Return to the Google Play Console tab, and click DONE to close the dialog
- Click on Grant Access for the newly added service account at the bottom of the screen (you may need to click Refresh service accounts before it shows up)
- Choose the permissions you'd like this account to have. We recommend Admin (all permissions), but you may want to manually select all checkboxes and leave out some
- Click Invite user to finish
1. Setup Fastlane
Run fastlane init with custom/empty configuration on each android and/or ios project folder.
iOS:
-
Create the app on Appstore Connect
-
Add all the files from the Fastlane repository example folder:
https://github.com/levin-riegner/fastlane/tree/master/example/ios
-
Configure the .env files with your project variables.
-
You can find the itc_team_id (APPSTORE_TEAM_ID) by entering the following website
https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/user/detail
There look for the contentProviderId
-
You can find the team_id (DEVELOPER_TEAM_ID) by entering the apple dev portal.
The last path on the URL will be the id.
Example: https://developer.apple.com/account/#/overview/1A2B3C4D5E → 1A2B3C4D5E
https://developer.apple.com/account
-
Get the new API Keys from the Appstore Connect API by following the instructions at the beginning of the page.
Android
Internal Testing
-
Add all the files from the Fastlane repository example folder:
https://github.com/levin-riegner/fastlane/tree/master/example/android
-
Configure the .env files with your project variables.
- You can find the firebase app id on Firebase > Project Settings > Apps.
- IMPORTANT: Make sure you click "Get Started" for all Apps on Firebase the Console >
App Distribution