Experienced Builder? New Computer?
Fast Build for Loop (master or automatic-bolus) or FreeAPS
Are you an advanced user who knows their way around the Mac Operating system?
Are you an experienced Looper who is aware of the cautions and proper way to do your settings so that you do not kill yourself or someone else?
New Looper, don’t know “mac”
Save yourself some aggravation. Go to LoopDocs for the step-by-step process with detailed pictures and arrows showing where to put your mouse. However, before you do this please note that LoopDocs-Build-Step 7 is no longer required. (Skip the homebrew and carthage installations but make sure you download a fresh copy of Loop code in LoopDocs-Build-Step 13.) And bookmark this page – come back here after you add the command line tools in LoopDocs-Build-Step 9 and do the Simulator Download step below. This is a new requirement that is not yet in LoopDocs; a new installation of Xcode no longer automatically downloads simulators and you need the simulator to build Loop.
Ready to go?
If you are building on a system that has the “wrong” version of carthage installed on it, these instructions won’t work; first manually uninstall carthage.
Starting with Xcode version 12.3, Xcode installation no longer automatically downloads the simulators. If you are using a new computer, with a fresh Xcode install, you must manually install the simulator. If you are missing the one for your phone and/or watch, you will not be able to successfully build. Between steps 2 and 3 below, take a moment to ensure the simulator for the device on which you plan to install Loop is installed.
- Disable your screen saver, then install Xcode 12.4 from the App Store
- In Xcode / Preferences / Locations: Set the Command Line Tools: to Xcode 12.4
- Do the simulator download below, if necessary
- In Xcode / Preferences / Accounts, add your Apple Developer account
- Reboot your computer
- Open Terminal and paste the script link from this page into Terminal: https://www.loopandlearn.org/build-select/
- After carefully reading each screen, pick the branch you want to build
- If prompted, follow the instructions to install carthage from the script (don’t worry, it will be the correct version)
- The package is not signed, so you have to open it (should be in your downloads directory) with a control click instead of a normal double click. Then pick Open from the menu and Open (greyed out) again from the pop up box. Then run through the install process. You will need to enter your password.
- When Xcode opens with your branch of Loop, follow the instructions on the web page that the script pops up, including signing the four top targets
- Make any code customization that you prefer
- You MUST wait for Indexing to finish and any Simulator downloads to complete before you click build
Please do not go to any of the support forums and ask for help saying you used these instructions.
If these instructions do not work for you, follow the steps (Skipping Step 7) from Loopdocs.
In Xcode, while still on the Xcode Preferences window, after adding command line tools using the Locations tab. Now click on the components tab. It should look similar to the figure on the left (above on mobile devices).
Choose the iOS operating system closest to the one on your phone and click the down arrow to install it. (If your phone has iOS 14.4.x, and the biggest number simulator you see is iOS 14.3, download that one. If your phone has iOS 13.3, first we recommend updating, but if you choose not to, then select iOS 13.3 from the list.)
Then scroll down to find the watchOS lines and choose the operating system on your watch (or biggest number if you don’t have a watch paired) and click the down arrow to install it.
Simulator download is now initiated. You can return to the list of steps above and continue with step 3.