These instructions allow you to build this Open-Source app without having access to a Mac.
The browser build defaults to automatically updating and building a new version of the app according to this schedule:
- automatically checks for updates weekly on Sundays and if updates are found, it will build a new version of the app
- automatically builds once a month regardless of whether there are updates, on the second Sunday of the month
- if a scheduled run finds nothing new to build, the run is cancelled and shows as cancelled (grey) in the Actions list - a green check always means a new build was made and uploaded to TestFlight
The Optional section provides instructions to modify the default behavior if desired.
The setup steps are somewhat involved, but nearly all are one time steps. Subsequent builds are trivial. Your app must be updated once every 90 days, but it's a simple click to make a new build and can be done from anywhere.
Note that installing with TestFlight requires the Apple ID account holder for the phone be 13 years or older (age varies with country). This can be circumvented by logging into Media & Purchase on the child's phone with an adult's account. More details on this can be found in LoopDocs.
This method for building without a Mac was ported from Loop. If you have used this method for Loop or one of the other DIY apps (LoopCaregiver, Trio, xDrip4iOS), some of the steps can be re-used and the full set of instructions does not need to be repeated. This will be mentioned in relevant sections below.
There are more detailed instructions in LoopDocs for doing Browser Builds of Loop and other apps, including troubleshooting and build errors. Please refer to LoopDocs for more details.
If you build multiple apps, it is strongly recommended that you configure a free GitHub organization and do all your building in the organization. This means you enter items one time for the organization (6 SECRETS required to build and 1 VARIABLE required to automatically update your certificates annually). Otherwise, those 6 SECRETS must be entered for every repository. Please refer to LoopDocs: Create a Free GitHub Organization.
You require 6 Secrets (alphanumeric items) to use the GitHub build method and if you use the GitHub method to build more than one app, you will use the same 6 Secrets for each app. (Examples are Loop, LoopCaregiver, LoopFollow, Trio and xDrip4iOS).
Each secret is indentified below by ALL_CAPITAL_LETTER_NAMES.
Refer to LoopDocs: Make a Secrets Reference File for a handy template to use when saving your Secrets.
This step is common for all GitHub Browser Builds; do this step only once.
If you already built an app using this method, reuse the 4 Secrets. If this is your first app, you will be saving 4 Secrets from your Apple Account in this step.
TEAMID.FASTLANE_ISSUER_ID.FASTLANE_KEY_ID.FASTLANE_KEY. Copy the full text, including the "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" lines.If you have previously built another app using the "browser build" method, you use the same personal access token (GH_PAT), so skip this step. If you use a free GitHub organization to build, you still use the same personal access token. This is created using your personal GitHub username.
Log into your GitHub account to create a personal access token; this is one of two GitHub secrets needed for your build.
No expiration.workflow permission scope * this also selects repo scope.GH_PAT.This is the second one of two GitHub secrets needed for your build.
The first time you build with the GitHub Browser Build method for any DIY app, you will make up a password and record it as MATCH_PASSWORD. You use the same password for all DIY apps. Note, if you later lose MATCH_PASSWORD, you will need to delete your Match-Secrets repository (automatically created), and go through the GitHub actions again.
A private Match-Secrets repository is automatically created under your GitHub username the first time you run a GitHub Action. Because it is a private repository - only you can see it. You will not take any direct actions with this repository; it needs to be there for GitHub to use as you progress through the steps.
TEAMIDFASTLANE_ISSUER_IDFASTLANE_KEY_IDFASTLANE_KEYGH_PATMATCH_PASSWORDENABLE_NUKE_CERTSThis step validates most of your six Secrets and provides error messages if it detects an issue with one or more. In addition, if you do not have a private Match-Secrets repository it creates one for you.
If you have created a LoopFollow app in App Store Connect before, skip ahead to Create Building Certificates.
com.TEAMID.LoopFollow, with TEAMID matching your team id.You do not need to fill out the next form. That is for submitting to the app store.
This step is no longer required. The Build LoopFollow function now takes care of this for you. It does not hurt to run it but is not needed.
Once a year, you will get an email from Apple indicating your certificate will expire in 30 days. You can ignore that email. When it does expire, the next time an automatic or manual build happens, the expired certificate information will be removed (nuked) from your Match-Secrets repository and a new one created. This should happen without you needing to take any action.
For more details, please refer to LoopDocs: TestFlight Overview and LoopDocs: Install on Phone
What if you don't want to allow automated updates of the repository or automatic builds?
You can affect the default behavior:
GH_PAT workflow permissionTo enable the scheduled build and sync, the GH_PAT must hold the workflow permission scopes. This permission serves as the enabler for automatic and scheduled builds with browser build. To verify your token holds this permission, follow these steps.
repo, workflow next to the FastLane Access Token linkworkflow box. You will see that the checked boxes for the repo scope become disabled (change color to dark gray and are not clickable)Update token buttonIf you choose not to have automatic building enabled, be sure the GH_PAT has repo scope or you won't be able to manually build.
You can modify the automation by creating and using some variables.
To configure the automated build more granularly involves creating up to two environment variables: SCHEDULED_BUILD and/or SCHEDULED_SYNC. See How to configure a variable.
Note that the weekly and monthly scheduled actions will continue, but the actions are modified if one or more of these variables is set to false. When a scheduled run ends without building, it shows as cancelled (grey) instead of successful - a green check always means a new build was made.
SCHEDULED_SYNC to false and either do not create SCHEDULED_BUILD or set it to trueSCHEDULED_BUILD to false and either do not create SCHEDULED_SYNC or set it to true
SCHEDULED_SYNC |
SCHEDULED_BUILD |
Automatic Actions |
|---|---|---|
true (or NA) |
true (or NA) |
weekly update check (auto update/build), monthly build with auto update |
true (or NA) |
false |
weekly update check with auto update, only builds if update detected |
false |
true (or NA) |
monthly build, no auto update |
false |
false |
no automatic activity |
Secrets and Variables.ActionsVariables tabNew repository variable button (upper right)SCHEDULED_BUILD in the "Name" fieldfalse in the "Value" fieldAdd variable button to save.New repository variable button (upper right)SCHEDULED_SYNC in the "Name" fieldfalse in the "Value" fieldAdd variable button to saveYour build will run on the following conditions:
false), no updates or building happens when the scheduled action runs; the run shows as cancelledSCHEDULED_SYNC set tofalse), it will only build once a month, on the second Sunday of the month, no update will happenSCHEDULED_BUILD set to false), it will run once weekly, every Sunday, to check for changes; if there are changes, it will update and buildThis is not typical. But if you do use more than one GitHub username, follow these steps at the time of the annual certificate renewal.
Now certificates for username2 have been cleared out of Match-Secrets storage for username2. Building can proceed as usual for both username1 and username2.