Build Beta with Browser
Use Browser Build for Public Beta Version¶
This page is provided to help people currently running the public beta version of Trio.
Public Beta
The public beta is built from the dev branch of Trio.
This code is undergoing testing and receives rapid updates. Be sure to follow along in Trio Discord and to update frequently (at least weekly).
To ensure weekly updates, make the dev branch the default branch in your fork on GitHub. Remember, this will just automatically trigger a build of the latest dev to TestFlight every Wednesday at 08:43 UTC. You are still responsible for manually installing the update via the TestFlight app on your phone.
Once this beta is released to main as 1.0, then you should return to building from the main branch.
Update to Trio dev branch from Trio 0.2.x main¶
A Note on Compatibility
Upgrading to Trio 0.5.x from 0.2.x is smooth and straightforward. The new Onboarding Wizard will guide you step by step. Your pump, CGM, therapy settings, and the last 24 hours of treatment and glucose history will be brought over automatically.
Be Aware
- Once you have upgraded to 0.5.x, going back to 0.2.x is not supported
- If you choose to downgrade, you will need to set everything up again from scratch
- If you accidentally build 0.2.x over 0.5.x, and then return to 0.5.x:
- You will see
“Oops? Some data didn’t make it over”every time you restart the app - But all your "stuff" is there
- See Remove Annoying Message
- You will see
- Some guardrails have changed compared to 0.2.x
- Your saved Temp Targets and Overrides will not be maintained
- The storage method in 0.5.x is different from 0.2.x, so you will need to recreate them
- Before you update from 0.2.x, capture a screenshot of each named Temp Target or Override that you want to add to 0.5.x
The Browser Build documentation is under construction for Trio version 0.5.x and newer.
This temporary set of instructions is intended for the subset of users who previously built Trio 0.2.x using Browser Build. Because this is aimed at experienced builders, some of the steps are abbreviated and will be expanded as the documents are updated.
If you are new to Trio — please wait until the documents have been expanded and preferably until the release of Trio 1.0.
Mac-Xcode to Browser Build¶
Experienced Mac-Xcode Builder
If you are an experienced Trio 0.2.x user who wants to join the open beta testing, but also wants to switch from Mac-Xcode build to Browser Build — welcome. For the time being, please do this:
- Use the 0.2.x: Build Trio with GitHub instructions to build Trio 0.2.x and wait for it to show up in your TestFlight. Do not install it — you just want to make sure you can succeed with a Browser Build.
- Then return to this page and follow the directions; you will need to run
Add IdentifiersandCreate Certificatesagain when updating to 0.5.x.
Transition from Other Apps to Trio Browser Build¶
Coming from Other Apps
If you are an experienced Browser Build person who has not built Trio before, you will need to add the Trio App Group to 3 Identifiers and create a Trio App in App Store Connect.
The steps are summarized in New Trio Builders.
If you are not experienced with Browser Build, we suggest you follow the 0.2.x instructions: 0.2.x: Build Trio with GitHub first. Then return to this page to update to 0.5.x; you will need to run Add Identifiers and Create Certificates again when updating to 0.5.x.
Summary of Tasks to Build Trio 0.5.x¶
These steps assume:
- You previously built Trio 0.2.x using GitHub Actions (Browser Build)
- You confirmed your Apple Developer license agreements are up to date
These are the new steps for you to follow:
- Configure Browser Build Certificate Automation
- Configure
Forkwithdevbranch- Configure the
devbranch as default (while public beta is ongoing)
- Configure the
- Update
Identifiers - Update
Certificates - Build Trio 0.5.x
Browser Build Certificate Automation¶
Browser Build Certificate Automation was added to Trio 0.2.3 - if you have not added the ENABLE_NUKE_CERTS variable, you should add it now. Otherwise, skip ahead to Configure Fork with dev branch.
In order to utilize the new automatic certificate renewal feature, you’ll need to add a new Variable. Variables are located in GitHub, in the same location as your Secrets. The exact location will depend upon whether you build using a GitHub organization or a personal account.
If you use a personal account, click on your Trio repository. If you have other repositories, just follow these same steps for each of them.
If you build using a GitHub organization and have already added this variable to your organization, there’s nothing for you to do. All repositories in your organization are covered. Otherwise, click on your organization name.
The numbered steps correspond to numbers in the graphics below:
- Choose settings
- Scroll down to select Secret and variables
- Choose Actions
- Choose Variable
- Tap on “Create new organization variable” or “New repository variable”
- For the Name, type
ENABLE_NUKE_CERTS - For the Value, type
true - Tap on Add Variable.
Configure Fork with dev branch¶
The open beta testing for Trio uses the dev branch.
- If you do not have a
devbranch you must first configure one following these directions. - If you already have a
devbranch, skip ahead to Update Branch and be sure to select thedevbranch when you update yourfork.
Add Branch¶
First, you need to get to your Trio repository and tap on the branch icon. (Do not worry about how many branches you have.):
The next screen displays the branches you currently have. It shows a New branch button in the upper right. If you don't see that, you are not logged in. Tap on the New branch button.
Each step in the list below matches with the number in the graphic. On the left half of the graphic is the default selections for your fork when main is the default branch. The right side shows the display after making the indicated selections.:
- Click on the drop-down menu labeled 1 in the graphic and choose nightscout/Trio
- Click on the drop-down menu labeled 2 in the graphic and choose
dev - Click on the
Branchname box labeled 3 in the graphic and typedev- The branch name in your
forkshould always match the branch name you are adding; check that you type it correctly
- The branch name in your
- Review the dialog items to make sure everything is correct, and then tap on Create branch
Configure the dev branch as default¶
This recommendation is only while the public beta is ongoing. Typically only developers configure the
devbranch as their default branch.
- Once you commit to the 0.5.x version of Trio, you want to stay with it
- By making the
devbranch your default, you will get automatic build updates weekly
These are the steps to modify the default branch.
For this example, we show how to change from a default branch of main to a default branch of dev. Note — only the owner of the repository can take this action and they must be logged in. Otherwise the Settings tab does not appear.
For the numbered steps below, refer to the graphic found under each group of steps.
-
Click on the Settings Icon near the top right of your Trio repository
- You may need to scroll down to see the
Default Branchas shown in the graphic - Do not tap on the Branches tab to the left under Code and Automation, that is not the correct menu
- You may need to scroll down to see the
-
To the right of the default branch name there is a pencil and a left-right arrow icon (⇄)
- Tap on the left-right arrow icon (⇄) to bring up the
Switch default branch to another branchdialog
- Tap on the left-right arrow icon (⇄) to bring up the
- Click on the dropdown next to the current default branch, in this example,
main
- Select the desired default branch, for the public beta, choose
dev -
Click on the
Updatebutton -
You will be presented with an are-you-sure question.
- Click on the red
I understand, update the default branch.button
- Click on the red
Your default branch has been changed.
Update Branch¶
The dev branch of the nightscout/Trio repository will be updated frequently. This is how you know if your fork needs to be updated as well. As long as the automatic runs are happening weekly for your repository — you will not need these manual instructions, unless you want to manually build an update sooner.
Tap the Code button (upper left) and ensure this branch in your fork is up to date.
- Select the desired branch in the dropdown menu (this graphic shows
mainbranch, to get 0.5.x, you must choosedevbranch) - If the message indicates this branch is "behind", tap on the sync
forkbutton and then the Update branch button
Update Identifiers¶
For Trio 0.5.x and newer, you must have Apple Push Notification enabled to build the app. This capability is added to the existing Trio Identifier by running the Action: Add Identifiers after you update your fork.
Refer to the graphic below for the numbered steps:
- Click on the
Actionstab of your Trio repository - On the left side, click on
2. Add Identifiers - On the right side, click
Run Workflowto show a dropdown menu- You will see your default branch (typically this is
main) - To update the
Identifiersso you can build the Trio 0.5.x, you must selectdev
- You will see your default branch (typically this is
-
Tap the green button that says
Run workflow.
Be Patient
- Refresh the browser if you are unsure if the action started
- Do not start a new action until the first one completes
The Add Identifiers Action should succeed or fail in a few minutes. Do not continue to the next step until this one succeeds.
Update Certificates¶
For Trio 0.5.x and newer, you must have Apple Push Notification enabled to build the app. After you add this capability to the Trio Identifier, you must update the Certificate by running the Action: Create Certificates.
Refer to the graphic below for the numbered steps:
- Click on the
Actionstab of your Trio repository - On the left side, click on
3. Create Certificates - On the right side, click
Run workflowto show a dropdown menu- You will see your default branch (typically
main) - Because you plan to build Trio 0.5.x, select
dev
- You will see your default branch (typically
-
Tap the green button that says
Run workflow. -
Wait a minute or two for the action to finish
Be Patient
- Refresh the browser if you are unsure if the action started
- Do not start a new action until the first one completes
Once you see the green check mark by Create Certificates, the next step is to Build the app.
Build the App¶
If you completed all the steps on this page successfully (got a green checkmark ✅), you are ready to run Action: Build Trio.
We recommend that while participating in the public beta, you should Configure the
devbranch as default. This will ensure weekly updates to TestFlight. You must still manually install updates to your phone from TestFlight.
If you choose to build a different branch than your default branch, there is an extra step when you Build Trio. In addition to the normal steps 1, 2, and 3 in the graphic below, you must also do the (optional) step. Select the dev branch in the branch dropdown menu before continuing to step 4 and tapping on the green Run workflow button:
Refresh, Do Not Repeat¶
Hit Refresh
After you tap the green Run workflow button, GitHub can be slow to update.
- Refresh the browser if you are unsure if the action started
- Do not start a new action until the first one completes
Disable the DO NOT RUN Actions¶
You may notice some GitHub actions that have DONT RUN or DO NOT RUN in their names. Those are special actions that are used by the developers. They are skipped in your Fork, but you may see logs for them.
If they already have the notation disabled beside them, so won't see them run. Otherwise, click on each one, click on the three dots at the upper right, and then select Disable workflow. Then you will avoid the annoyance of seeing logs that say the action was automatically run and then skipped.
Update Build Errors¶
The most likely build error is that you did not Update Identifiers and Certificates.
In that case, you will see this error in the build action annotations.
Error¶
If you decide to look at the action log, instead of reading the annotations, you may see an error similar to the two graphics below.
Solution¶
- Update
Identifiers- make sure you selectdevbranch - Update
Certificates- make sure you selectdevbranch
New Trio Builders¶
For experienced browser builders, this minimal set of instructions might be sufficient.
Warning - there is no hand holding in these directions.
Every app you build will use the same 6 Secrets.
- Fork from: https://github.com/nightscout/Trio
- Use the
Trio App Groupfor Trio, see Create theTrio App Group Identifiersfor Trio: see Table ofIdentifiers- Add the
Trio App Groupto theseIdentifiers:TrioTrio WatchTrio WatchKit Extension
- In
App Store Connect, theBundle IDfor Trio will be:org.nightscout.TEAMID.trio
Create the Trio App Group¶
If you already have a Trio App Group
- You can skip this step - your existing App Groups are found at this link: App Group List
- If your
Trio App Groupwas created from a Mac with Xcode, you may choose to edit the Description to make the NAME match
If you do not have a Trio App Group:
- Go to Register an App Group on the Apple developer site and use the table below to help you create one.
- Replace
TEAMIDwith your Apple Developer ID.
| NAME | Xcode version (NAME) | IDENTIFIER |
|---|---|---|
| Trio App Group | group org nightscout TEAMID trio trio-app-group | group.org.nightscout.TEAMID.trio.trio-app-group |
Table of Identifiers¶
These are the Identifiers created by running the GitHub action "Add Identifiers". Only 3 of them need to have the Trio App Group added. Be sure that you selected the dev branch when you start the "Add Identifiers" action. For more details, see Update Identifiers, but then return here when that action succeeds.
| NAME | Xcode version (NAME) | IDENTIFIER |
|---|---|---|
| Trio | XC org nightscout TEAMID trio | org.nightscout.TEAMID.trio |
| Trio LiveActivity | - | org.nightscout.TEAMID.trio.LiveActivity |
| Trio Watch App | XC IDENTIFIER | org.nightscout.TEAMID.trio.watchkitapp |
| Trio Watch Complication | XC IDENTIFIER | org.nightscout.TEAMID.trio.watchkitapp.TrioWatchComplication |
Add Trio App Group to Identifiers¶
Configure Trio App¶
Follow the directions in LoopDocs, but use the Trio Bundle ID
- In
App Store Connect, theBundle IDfor Trio will be:org.nightscout.TEAMID.trio
Return to the main set of instructions on this page, Update Certificates, and keep going until you have a successful build.
Extra Tips¶
Remove Annoying Message¶
If you accidentally build 0.2.x over 0.5.x, and then return to 0.5.x:
- You will see
“Oops? Some data didn’t make it over”every time you restart the app - But all your "stuff" is there
You see that because some special files are labeled with .migrated by 0.5.x when you complete the onboarding action when you upgrade from 0.2.x to 0.5.x.
- When you accidentally build 0.2.x over 0.5.x, the old names for the files are recreated
- When you restore to 0.5.x, it sees the duplicate files, one set has
.migratedin the file name and one set does not - You are warned that migration can't happen - but for this case, you don't need it
You can get rid of the annoying message by taking these steps:
First quit (stop running, swipe up) the Trio app
- Search for Files on your phone
- Open the
Triofolder on your phone - Open the
enactfolder- you may see 4 files, instead of 2
- delete the ones that do not have
.migratedin the name
- Open the
monitorfolder- you will probably see many files, but 3 of them have
.migratedin the name - find the files with the same name except for
.migratedand delete them
- you will probably see many files, but 3 of them have
Open the Trio app and it should just say "Getting everything ready for you" and just keep going. Annoying message is gone.








