Browser Build:  Customize your Loop app

Customizations are the way to create your own personalized Loop app.  Before you start to customize your Loop, you must successfully complete the Build Loop action.

This page explains how to customize your Loop app using the Browser Build for prepared customizations that are available in the Customization Select script. Learn more about other customization options by clicking the links above.

  1. Overall Instructions for Browser Build
  2. Template for Browser Build
  3. Updating Your Fork

The process is the same regardless of which of the customization templates that you use.

  • Once you add your customizations to the build_loop.yml file, it should work every time you run Action: Build Loop and typically continues to work across updates

Browser Build Overview

To customize with the Browser Build method, you need to modify your build instruction file, also known as your build_loop.yml file using these steps:

  1. Locate the Paste Line  (in build_loop.yml file)
  2. Copy (from the appropriate template)
  3. Paste (in build_loop.yml file)
  4. Edit (the template for your needs)
  5. Save or Cancel (in build_loop.yml file)
  6. Build Loop
  7. Troubleshoot (if necessary)

Locate the Paste Line

  • Make sure you are logged into your GitHub account.  If you are not logged in, you will see Sign In/ Sign Up in the upper right corner
  • Navigate to this link and substitute your GitHub username for username:
  • There is a pencil on the right side – tap on the pencil and now you can edit the file
  • Refer to the graphic below
  • You need to find the line that starts with “# Patch Fastlane” (you will paste the template above this line)
  • Use command-f (on a Mac) or control-f (on a PC), to find this phrase (use copy button below) and then command-v (on a Mac) or control-v (on a PC) to paste it into the search bar

  • There is a blank line just above “# Patch Fastlane Match to not print tables”.  We’ll call this row your Paste Line
  • As of 21 July 2024, the Paste Line is on  279 for Loop-main, but is subject to change

Copy

WARNING – the template only works from the original language version – do not copy and paste from a translated page.

How to Copy:

  • Click on one of the lines in the template below to copy the entire template to your paste buffer
  • The words “Copied to Clipboard” will appear briefly.
Customization Template – main

This template is for Loop 3.4.x, released 13 July 2024 or later

          

          # The lines below add the customizations listed using the CustomizationSelect script
          # The "" is a continuation character 
          #   the line following a "" should not be blank
          /bin/bash -c "$(curl -fsSL \
          https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/CustomizationSelect.sh)" \
          dexcom_upload_readings \
          future_carbs_4h \
          low_carb_limit \
          high_carb_limit \
          override_sens \
          now_line \
          lnl_icon \
          watch_title \
          2hlollipop \
          meal_days \
          meal_week \
          profiles \
          basal_lock \
          live_activity

          # the final customization listed above CANNOT have a continuation character
          # more customizations can be pasted after this line

        

Customization Template – dev branch

Alert:  No one should be building dev branch unless they are an expert.  This section is a placeholder in case it is needed later. Use the Customization Template – main until told otherwise.

Paste

  • Use the space bar to make sure that your cursor lines up in the correct column on the Paste Line.
  • Paste (using either command or control-v, depending upon whether you’re using a Mac or PC) the copied content into your build_loop.yml file at the Paste Line
  • After pasting, hit return to insert another blank line

    Edit

    • This template includes all customizations for your convenience
    • Make sure the lines you pasted are in the same column as the lines above your new lines
    • Delete any customizations you don’t want 
    • Do not delete the script lines that come above dexcom_upload_readings.
    • Some customizations are incompatible and you must choose which one to remove
      • You cannot include both low_carb_limit and high_carb_limit; choose one or neither
      • You cannot include both meal_days and meal_week; choose one or neither
    • Do not try to put in a # symbol to remove a customization, you must delete the whole line
    • Edit and save as often as you need
    • If you want to disable authentication, you must type it in yourself
      • You must add the “no_auth” yourself (no quotes) – it can be on the same line as another customization, separated by a space, or you can make a separate line following the pattern in the template
    • All but the last line ends in a continuation character \
      • There can be nothing after that on any line
      • If you insert spaces after the \, your build will fail
    • The last customization in the list cannot end with the continuation character \. if one is there, you must remove it

    Save or Cancel

    When editing is complete, you can either Commit (save) the edits or Cancel them

    • To save your edits, tap the Commit Changes button on the upper right and commit to your current branch
      • Once you commit your edits, you can make additional edits and modify the file again and save it with a new commit
      • Each commit is recorded in your history, so including a comment about what you meant to do with each commit is a good idea
      • Edit and save as often as needed
    • To cancel your edits, tap the Cancel Changes button in the upper right corner
      • You will be asked to confirm that you want to discard your unsaved changes
    •  Optional
      1. Edit the Commit message to be more specific; default is Update build_loop.yml
      2. Tap on Commit Changes at the bottom right to save to your main branch

    Build Loop

    • When you are happy with the edits to your build_loop.yml, hit Actions: 4 Build Loop
    • Assuming there are no build errors, your new build will be ready in TestFlight in about an hour
    • If your build fails after customizing, check out the Troubleshooting tips below.
    • To clear your errors, you will need to edit your build_loop.yml as described above

     

    Troubleshooting

    If you are successful in your Action->Build Loop, but your build fails after you customize, the information below should help you troubleshoot.  If you need help, post on Facebook with the link to your build_loop.yml file.  Get a link by clicking anywhere on the line below to copy it to your buffer.  Just substitute your GitHub username for username.  Do not provide screenshots.

    Updating Your Fork

    Once you add your customizations to the build_loop.yml file, your customizations will be in future updates without your taking any action. Loop 3.4’s automated build function will update your code and rebuild Loop for you. You just need to install it from TestFlight.
    You can also manually rebuild or update at any time. To rebuild using your current code, just run Action>Build Loop. If you’d like to update your code (and don’t want to wait for up to 7 days for the automatic process to do it for you), click Code > Sync Fork. Do not click Contribute, which creates a Pull Request for Loop’s developers to decline.

      Skip to content