Skip to content
  • Home
  • Nightscout Overview
  • New Nightscout
  • Nightscout with Loop
  • Nightscout Troubleshooting
  • Nightscout Cross Ref
  • Remote Overview
  • Remote Configuration
  • Remote Commands
  • Remote Errors
  • LoopCaregiver
  • Translation
  • Custom Edits with Mac

    Overview

    When applying a customization using Mac, the downloaded code should be fairly recent. If you are not sure, get a fresh download. If you know your downloaded code is the Current Release, you can skip the download and use the same folder as last time.

    Find My Downloaded Loop Code

    Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom.

    Loop to LoopWorkspace

    Note that the directory Loop.xcworkspace has been renamed to LoopWorkspace.xcworkspace in the released code. For experienced builders - you realize this is good because the build process is easier.

    The words were updated, but it will take time for the graphics to be updated.

    how to use finder to find the correct download and open xcode

    Experienced Builders

    Experienced builders will often build a fresh download to a simulator for their phone iOS (not their phone) to ensure download is good and is compatible with macOS, Xcode and phone iOS. Once the build is successful, they apply their customizations and build again to the simulator. Last step is to build the customized version to their real phone.

    Instructions for Finding the Lines

    For each customization, you are given landmarks to find the correct location in the code when you review Version: Custom Edits. You can choose to search using the Key_Phrase or navigate to the file in the folder structure and look for ( Cmd+L # ) the line number.

    Key_Phrase

    Example of a Key_Phrase
    use the copy button at right, paste into search
    The copy button for this exampe is just for practice
    Do not paste the result anywhere
    

    To search using the Key_Phrase (see graphic below for clarification):

    graphic showing how to search using the Key_Phrase

    Module, Folder, File

    Each customization will also show Module, Folder and File bullet below the key phrase.

    Open a Terminal in LoopWorkspace Folder

    If you use the Loop and Learn: Customization Select Script, it automatically locates your most recent download, makes the customization you select in that download and then opens Xcode for you.

    But sometimes, you need to find your downloaded code and make your own changes in Xcode. This section tells you how to do this.

    Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom. Double clicking on that file opens Xcode; but to apply customizations, you need to type commands in the terminal.

    This new terminal window is ready to accept commands as needed when the instructions say to start a terminal in the LoopWorkspace folder.

    To confirm you are in the correct location, type pwd and return in the terminal. The response must end in LoopWorkspace. For example, using the graphic below, the response to pwd should be similar to:

    /Users/marion/Downloads/BuildLoop/Loop-20220803-1145/LoopWorkspace

    how to use finder to find the correct download and open xcode

    Folders and Icons

    The folders listed in the code customization steps are the actual directory names as stored on your computer. However, a shortened name is used for some folders when being displayed as icons in Xcode. Some people prefer to search through the folder icons to find a file instead of using the Find in Workspace feature.

    These folder icon names are different from the directory names on the computer:

    Folder Icon Name Directory Name
    ShareClient dexcom-share-client-swift

    All other icons and directory names match.

    Modify and Save