Build Other Apps with Browser
Using GitHub Browser Build Method to Build Other Apps¶
Once Loop 3 was released with the ability to build using a browser, a lot of other repositories in the DIY universe began to add the same feature. Only apps that are companions to Loop are included on this page. If you want to build another DIY app that is not included here, look for the file fastlane/testflight.md
in that app's repository and open it in a browser. The instruction for that apps should be located in that file.
The same technique is used and the same six Secrets are applied to each repository. Those secrets are tied to your Apple Developer ID and your GitHub account.
- Loop Caregiver
- Loop Follow
GH_PAT - NEW RECOMMENDATION
It is now recommended that you use a GitHub Personal Access Token (GH_PAT) that never expires
If you choose a GitHub personal access token that expires, you will get an email to renew it about 6 days ahead. You will paste your updated GH_PAT into the secrets for each repository you use and initiate the Build Action for that app. This will ensure continued availability of all your apps that you build with this method.
Prerequisites¶
-
If you have already built using the GitHub Browser Build method, it is easy to build the next repository. Skip ahead to Fork and Add Secrets
-
If this is the first repository you have built with the GitHub Browser Build method, you must first complete the initial steps found on GitHub First-Time. When you reach the point where
- You have created your Match-Secrets repository
- You are told to GitHub First-Time: Fork LoopWorkspace
- Review the directions but don't do it
- Return here and check the table below
- Use that table to find the link of the repository you will fork
Use the repository for the application you are building
Many graphics on this page show LoopWorkspace, just remember to use the repository for the app you want to build, that is either Loop Follow or Loop Caregiver.
Fork and Add Secrets¶
- You will return to this page after reviewing (but not doing) this step GitHub First-Time: Fork LoopWorkspace
- Use the same method as that section, but fork the repository for the app you plan to build
- Loop Caregiver, expect the branch to be "dev"
- Loop Follow, expect the branch to be "main"
App | Fork from this Address | Documentation |
---|---|---|
Loop Caregiver | https://github.com/LoopKit/LoopCaregiver | LoopDocs: Loop Caregiver |
Loop Follow | https://github.com/loopandlearn/LoopFollow | Loop Follow |
Configure Secrets for this App¶
After successfully creating your fork of the repository for this app:
-
If you have already built Loop using the GitHub Browser Build method, skip ahead to Add Existing Secrets
-
If this is the first repository you have built with GitHub
- You should follow the detailed steps at GitHub First-Time: Configure Secrets, except you will apply the Secrets to the repository for the app you are planning to build
- Once your 6 secrets have been added, return to this page and skip ahead to Validate Secrets on this page.
Add Existing Secrets¶
MATCH_PASSWORD
An early version of GitHub First-Time had incorrect information about the need to save MATCH_PASSWORD.
If you did not save your MATCH_PASSWORD in your file with all your Secrets, you will need to delete your Match-Secrets repository, create a new one and then add all your Secrets into all you repositories again and run all the Actions again.
Instructions are found at Reset Match-Secrets.
Open the text file in which you maintain a copy of your 6 Secrets so you can copy each value into the Secrets for this repository.
- Click on the repository for your app
-
Click on the Settings Icon near the top right of your repository
- On the left side, tap on
Secrets and variables
dropdown and choose Actions - After you select Actions, your screen should look like the graphic below
- On the left side, tap on
-
Tap on
New repository secret
and add each of the 6 Secrets- You will notices the New secret dialog looks a little different
- As soon as you click on the Name* Box, the 6 Secret Names show up as a dropdown as shown in the graphic below
- Select each one in turn and paste the secret value into the Secret* box and hit Add secret
Once all six Secrets are added, you will either to the first Action to validate your secrets.
Validate Secrets¶
The first action step is to Validate Secrets.
Near the top middle of your Repository fork, click on the "Actions" tab.
- The first time you click on
Actions
with this repository you'll be informed thatWorkflows aren't being run on this forked repository
- Tap on the green button that says:
I understand my workflows, go ahead and enable them
The workflows are now displayed: look at the list on the left side similar to that shown in the graphic below. (You can dismiss the Actions Enabled message using the X near the upper right side if it appears).
- The graphic below is an example from Loop, your screen will show your app and associated repository
This step validates most of your six Secrets and provides error messages if it detects an issue with one or more.
- Click on the "Actions" tab of your Loop Follow or Loop Caregiver repository and enable workflows if needed
- On the left side, click on 1.
Validate Secrets
- On the right side, click
Run Workflow
to show a drop-down menu- You will see your default branch (
main
for LoopFollow,dev
for LoopCaregiver) - You can select a different branch, but typically, you run the default
- You will see your default branch (
- Tap the green button that says
Run workflow
.
The Validate Secrets
Action should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
- If you see the green check () continue to the next section
- If you see the red
X
():- Examine the Error tells how to view the file needed to diagnose your problem.
- Action: Validate Secrets Errors tells you what to search for in the file
- Resolve the error and repeat the Action: Validate Secrets
Add Identifiers¶
Near the top middle of your Repository fork, click on the "Actions" tab.
- The graphic below is an example from Loop, your screen will show your app and associated repository
Refer to the graphic below for the numbered steps:
- Click on the "Actions" tab of your repository
- On the left side, click on "Add Identifiers"
- On the right side, click "Run Workflow" to show a drop-down menu
- You will see your default branch (
main
for LoopFollow,dev
for LoopCaregiver) - You can select a different branch, but typically, you run the default
- You will see your default branch (
-
Tap the green button that says "Run workflow".
The Add Identifier
Action should succeed or fail in a few minutes.
- If you see the green check () continue to the next section
- If you see the red
X
():- Examine the Error tells how to view the file needed to diagnose your problem.
- Action: Add Identifiers Errors tells you what to search for in the file
- Resolve the error and repeat the Action: Add Identifiers
Review App Identifier¶
Open this link: Certificates, Identifiers & Profiles: Identifiers List on the apple developer site.
After successfully performing the Add Identifiers Action, you will see the identifier for your app with a Name and Bundle ID matching that in the table below. You will see your unique TEAMID embedded in the identifier. (If you previously built this App with Xcode, the name may start with XC but the ending should match.)
App Name | Name | Bundle ID |
---|---|---|
Loop Caregiver | Loop Caregiver | com.TEAMID.loopkit.LoopCaregiver |
Loop Follow | LoopFollow | com.TEAMID.LoopFollow |
Some apps, like Loop, require updates to the Identifiers after they are generated.
These apps, Loop Caregiver and Loop Follow, do not require that extra step.
Create App in App Store Connect¶
You will be following the directions below to create an App in App Store Connect if you don't already have one.
This requires you to provide some information. Examine the table below for the bundle ID associated with your app.
App Name | Bundle ID |
---|---|
Loop Caregiver | com.TEAMID.loopkit.LoopCaregiver |
Loop Follow | com.TEAMID.LoopFollow |
-
Open this link: App Store Connect / Apps to view your apps; log in if needed.
-
If this App already exists, you can continue to Create Certificates
-
Click the Add Apps button or the blue "plus" icon and select New App as shown in the graphic below
-
The New App dialog box opens and should appear similar to the graphic below. Before you fill anything out, make sure your Bundle ID is available in the dropdown menu. If you do not see the Bundle ID for your app; back out of this screen and follow the directions in GitHub First-Time: Find My Loop, where you'll be finding App Name instead of Loop.
- Select "iOS".
- Enter a name: this will have to be unique
- You could start with "App Name ABC" where ABC are your initials
- If that is already taken, you can add a number, for example, "App Name ABC 123"
- This name is what you see on the App Store Connect list and in the TestFlight app
- Once installed on your phone, you will see the actual app name
- You can Change the App Store Connect Name later if you want
- Select your primary language.
- Choose the bundle ID for your app
- SKU can be anything; for example "123" but must be unique across all your apps, so try 1234 or 12345 depending on how many apps you build with this method
- Select "Full Access".
-
Click Create but do not fill out the next form. That is for submitting to the app store and you will not be doing that.
You are done with this activity. You can close the browser tab, but before you do, note the TestFlight tab at the top of the page. You'll be using that tab after you complete the next two actions.
Create Certificates¶
- The graphic below is an example from Loop, your screen will show your app and associated repository
Refer to the graphic below for the numbered steps:
- Click on the "Actions" tab of your Repository repository
- On the left side, click on "Create Certificates"
- On the right side, click "Run Workflow" to show a drop-down menu
- You will see your default branch (
main
for LoopFollow,dev
for LoopCaregiver) - You can select a different branch, but typically, you run the default
- You will see your default branch (
-
Tap the green button that says "Run workflow".
-
Wait a minute or two for the action to finish
- If this action fails, head over to Action: Create Certificates Errors
- Once you've resolved the error, repeat the Actions Add Identifiers and then Create Certificates. (The Add Identifiers might not be required but it is fast and should be done as a matter of routine.)
Build App¶
- The graphic below is an example from Loop, your screen will show your app and associated repository
Refer to the graphic below for the first four steps:
- Click on the "Actions" tab of your Repository repository.
- On the left side, click on "Build App Name".
- On the right side, click "Run Workflow" to show a drop-down menu
- You will see your default branch (
main
for LoopFollow,dev
for LoopCaregiver) - You can select a different branch, but typically, you run the default
- You will see your default branch (
-
Tap the green button that says "Run workflow".
-
Wait a few minutes to make sure there is not an early failure
- If this action fails, head over to Action: Build Loop Errors
- Once you've resolved the error, it's a good idea to repeat all three steps in this order:
- Add Identifiers
- Create Certificates
- Build Loop
- If the process appears to be happening without an error, go do something else for a while. The build should take about 20-30 minutes.
- Your app should eventually appear on App Store Connect.
Add Users to TestFlight for App¶
Once the first build completes, you will be able to configure TestFlight for the app - follow the template for setting up TestFlight for Loop found in GitHub First-Time: Set Up Users and Access (TestFlight)
Deployment¶
The GitHub Deployment walks you through the steps to deploy to a phone. When going through those steps, replace your App Name for Loop. Everything else is the same.