Skip to content

Commit e6fecf1

Browse files
committed
Reorder, rephrase some instructions
1 parent d1875bd commit e6fecf1

File tree

1 file changed

+60
-38
lines changed

1 file changed

+60
-38
lines changed

docs/build/code_customization.md

Lines changed: 60 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ There is an optional method for applying patches. The procedure, developed for t
88
* Mac-Xcode: paste the command(s) in the terminal (LoopWorkspace folder) and build again with Xcode
99
* GitHub Broswer Build: paste the command(s) in the customization section of the build_loop.yml file and use the Build Loop Action
1010

11-
A few of the specific commits on this page can be copied from the [LnL: Customization: Prepared Patches](https://www.loopandlearn.org/custom-code/) page. Others you create your own commit as described in [LoopDocs: GitHub Customization](../gh-actions/gh-customize.md#prepare-the-patches).
11+
A few of the specific commits on this page can be copied from the [Loop and Learn: Customization: Prepared Patches](https://www.loopandlearn.org/custom-code#prepared-patches) page. Others you create your own commit as described in [LoopDocs: GitHub Customization](../gh-actions/gh-customize.md#prepare-the-patches).
1212

1313
!!! question "Is it worth making Prepared Patches for Mac-Xcode build?"
1414
That's a good question - only you can answer it.
1515

1616
### Mac-Xcode
1717

18-
The customization instructions on this page were written for the [Mac-Xcode Build](../build/overview.md) method. The downloaded code on your computer has all the Modules available in Xcode. So you can search for the `Key_Phrase` and it will be found regardless of the Module.
18+
The customization instructions on this page were originally written for the [Mac-Xcode Build](../build/overview.md) method. The downloaded code on your computer has all the Modules available in Xcode. So you can search for the `Key_Phrase` and it will be found regardless of the Module.
1919

20-
### Browser Build
20+
### GitHub Browser Build
2121

2222
The same `Key_Phrase` concept for finding lines to modify is used for the GitHub Browser Build method, but you need to apply a different procedure for creating the customization if you're just using a browser. The details on found on the [Customize with GitHub](../gh-actions/gh-customize.md) page.
2323

@@ -113,40 +113,38 @@ List of some flags and what they do:
113113

114114
## Instructions for Finding the Lines
115115

116-
There are other customizations where the user goes into a particular file and makes a specific change to the code. The instructions on this page are for the Mac-Xcode method.
116+
The instructions on this page were originally prepared for the Mac-Xcode method.
117117

118-
GitHub Browser Build method instructions are similar, but each one is used to create a commit to your fork. You will then save the SHA-1 for the commit, create a patch command and then add that patch command to your build_loop.yml file. Detailed instructions are on the [Customize with GitHub](../gh-actions/gh-customize.md) page.
118+
The GitHub Browser Build method instructions are similar, but each one is used to create a commit to your fork. You will then save the SHA-1 for the commit, create a patch command and then add that patch command to your build_loop.yml file. Detailed instructions are on the [Customize with GitHub](../gh-actions/gh-customize.md) page.
119119

120-
For each customization, you will be given landmarks to find the correct location in the code. 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. Note that the folder is listed with respect to the LoopWorkspace directory. The first name in the folder structure is the name of the Module.
120+
For each customization, you will be given landmarks to find the correct location in the code. 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.
121121

122-
**For Mac-Xcode builders, be sure to save the file when you make a change - otherwise the modification does not get built into your app.**
122+
For Mac-Xcode builders:
123+
124+
* Either [Key_Phrase](#key_phrase) or [Module, Folder, File](#module-folder-file)
125+
can be used to find the lines
126+
* Be sure to save the file when you make a change - otherwise the modification does not get built into your app
127+
* Some folder icons show different names in Xcode, see [Folders and Icons](#folders-and-icons)
128+
129+
For GitHub Browser builders;
130+
131+
* Some customizations can be copied from the [Loop and Learn: Customization: Prepared Patches](https://www.loopandlearn.org/custom-code#prepared-patches) page
132+
* Otherwise, create your own commit for the Module identified under [Module, Folder, File](#module-folder-file)
133+
134+
### Key_Phrase
123135

124136
``` { .txt .copy title="Example of a Key_Phrase" }
125137
use the copy button at right, paste into search
126138
The copy button for this exampe is just for practice
127139
Do not paste the result anywhere
128140
```
129141

130-
Example of the Module, Folder, File bullets:
131-
132-
* Module: Loop
133-
* Folder: Loop/subfolder1/subfolder2/etc.
134-
* File: filename.swift, line number(s)
135-
136-
There may be a figure illustrating the change.
137-
138-
Below the figure, the original, and in some cases, the modified code will be displayed as text.
139-
140-
* Most customizations show the original line of code that you will be changing
141-
* Sometimes that line is long and you may need to use the scroll bar to see the entire line in LoopDocs
142-
* In most cases, an example customization is shown to assist you in deciding how to edit the line to meet your needs
143-
144142
To search using the `Key_Phrase` (see graphic below for clarification):
145143

146144
* A copy button is available when you hover your mouse in the right-hand side of the block below the title `Key_Phrase`; click on it to copy the phrase
147145
* In Xcode, tap the Find menu item and select `Find in Workspace`
148146
* Paste the text into the Find search-box that opens on upper left of Xcode screen and hit enter
149-
* **If you don't see the phrase in the box, hit backspace - your system may have copied an extra return**
147+
* **If you don't see the phrase in the box, hit backspace - your system copied an extra return**
150148
* You should see a message `1 result in 1 file` (for most cases)
151149
* Some customizations will show more than one result, but that will be explained in the directions for that customization
152150
* The file in which the line is located is reported showing the line in that file containing the `Key_Phrase`
@@ -157,36 +155,36 @@ To search using the `Key_Phrase` (see graphic below for clarification):
157155
![graphic showing how to search using the Key_Phrase](img/code-custom-xcode-search.svg){width="750"}
158156
{align="center"}
159157

160-
<br>
158+
### Module, Folder, File
161159

162-
### Folders and Icons
160+
Each customization will also show Module, Folder and File bullet below the key phrase.
163161

164-
The folders listed in the code customization steps below 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.
162+
* Module: Loop
163+
* Folder: Loop/subfolder1/subfolder2/etc.
164+
* File: filename.swift, line number(s)
165165

166-
In the graphic below, the user searched for an item found for both Eros and DASH pods (in two different files). The top part of the graphic shows the result of the search with user clicking on one instance. On the right side of the top graphic (highlighted by red rectangle) is the name of the selected file on the computer with the full directory name.
167166

168-
* Inset 1: User clicked on the folder icon (highlighted by red square) to see the list of icons for folders included in the LoopWorkspace
169-
* Inset 2: User opens folders under RileyLink icon to open OmniKit, then OmnipodCommon to find the Pod.swift file (NOTE - the Eros information is in a different Module now, OmniKit, but the graphic has not been updated.)
167+
## Customizations:
170168

171-
![graphic showing folder icons vs folder names](img/xcode-folder-names.svg){width="750"}
172-
{align="center"}
169+
The customizations below show the original line of code that you will be changing.
173170

174-
These folder icon names are different from the directory names on the computer:
171+
There may be a figure illustrating the change.
175172

176-
| Folder Icon Name | Directory Name | |
177-
|:--|:--||
178-
| ShareClient | dexcom-share-client-swift |
179-
| RileyLink | rileylink_ios |
180-
| Amplitude | Amplitude-iOS |
173+
Below the figure, the original, and in some cases, the modified code will be displayed as text.
181174

182-
All other icons and directory names match.
175+
* Sometimes that line is long and you may need to use the scroll bar to see the entire line in LoopDocs
176+
* In most cases, an example customization is shown to assist you in deciding how to edit the line to meet your needs
183177

184178

185179
## Disable Authentication for Bolusing
186180

187181
Depending on your iPhone preferences and model, you may have Face ID or Touch ID enabled. Those security features will also be used to authenticate bolus delivery in Loop. You can choose to disable authentication (i.e., not require Face ID, Touch ID, or passcode for bolusing) through the following code customization.
188182

189-
!!! warning "Loop 3"
183+
!!! warning "Safety Measure"
184+
If you disable this, you are removing an important safety feature.
185+
186+
In addition to authenticating every manual bolus, this helps to protect against sleep bolusing and pocket bolusing.
187+
190188
For Loop 3, this controls the authorization requirement to modify Therapy Settings as well as to confirm bolus delivery.
191189

192190
``` { .txt .copy title="Key_Phrase" }
@@ -867,3 +865,27 @@ if let lastLoopCompleted = self.lastLoopCompleted, Date().timeIntervalSince(last
867865
## Limit Loop HUD Update
868866

869867
Loop 3.0 has a refreshTimer for interrogating pod status to display on the Heads-Up-Display (HUD). This was removed after users reported an increase in pod faults. If you are running Loop 3.0 and having frequent pod faults, you should build Loop 3.2. The customization that was here has been removed with the release of 3.2.
868+
869+
870+
## Folders and Icons
871+
872+
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.
873+
874+
In the graphic below, the user searched for an item found for both Eros and DASH pods (in two different files). The top part of the graphic shows the result of the search with user clicking on one instance. On the right side of the top graphic (highlighted by red rectangle) is the name of the selected file on the computer with the full directory name.
875+
876+
* Inset 1: User clicked on the folder icon (highlighted by red square) to see the list of icons for folders included in the LoopWorkspace
877+
* Inset 2: User opens folders under RileyLink icon to open OmniKit, then OmnipodCommon to find the Pod.swift file (NOTE - the Eros information is in a different Module now, OmniKit, but the graphic has not been updated.)
878+
879+
![graphic showing folder icons vs folder names](img/xcode-folder-names.svg){width="750"}
880+
{align="center"}
881+
882+
These folder icon names are different from the directory names on the computer:
883+
884+
| Folder Icon Name | Directory Name | |
885+
|:--|:--||
886+
| ShareClient | dexcom-share-client-swift |
887+
| RileyLink | rileylink_ios |
888+
| Amplitude | Amplitude-iOS |
889+
890+
All other icons and directory names match.
891+

0 commit comments

Comments
 (0)