You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/code_customization.md
+60-38Lines changed: 60 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@ There is an optional method for applying patches. The procedure, developed for t
8
8
* Mac-Xcode: paste the command(s) in the terminal (LoopWorkspace folder) and build again with Xcode
9
9
* GitHub Broswer Build: paste the command(s) in the customization section of the build_loop.yml file and use the Build Loop Action
10
10
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).
12
12
13
13
!!! question "Is it worth making Prepared Patches for Mac-Xcode build?"
14
14
That's a good question - only you can answer it.
15
15
16
16
### Mac-Xcode
17
17
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.
19
19
20
-
### Browser Build
20
+
### GitHub Browser Build
21
21
22
22
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.
23
23
@@ -113,40 +113,38 @@ List of some flags and what they do:
113
113
114
114
## Instructions for Finding the Lines
115
115
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.
117
117
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.
119
119
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.
121
121
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
123
135
124
136
```{ .txt .copy title="Example of a Key_Phrase" }
125
137
use the copy button at right, paste into search
126
138
The copy button for this exampe is just for practice
127
139
Do not paste the result anywhere
128
140
```
129
141
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
-
144
142
To search using the `Key_Phrase` (see graphic below for clarification):
145
143
146
144
* 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
147
145
* In Xcode, tap the Find menu item and select `Find in Workspace`
148
146
* 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**
150
148
* You should see a message `1 result in 1 file` (for most cases)
151
149
* Some customizations will show more than one result, but that will be explained in the directions for that customization
152
150
* 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):
157
155
{width="750"}
158
156
{align="center"}
159
157
160
-
<br>
158
+
### Module, Folder, File
161
159
162
-
### Folders and Icons
160
+
Each customization will also show Module, Folder and File bullet below the key phrase.
163
161
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)
165
165
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.
167
166
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:
170
168
171
-
{width="750"}
172
-
{align="center"}
169
+
The customizations below show the original line of code that you will be changing.
173
170
174
-
These folder icon names are different from the directory names on the computer:
171
+
There may be a figure illustrating the change.
175
172
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.
181
174
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
183
177
184
178
185
179
## Disable Authentication for Bolusing
186
180
187
181
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.
188
182
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
+
190
188
For Loop 3, this controls the authorization requirement to modify Therapy Settings as well as to confirm bolus delivery.
191
189
192
190
```{ .txt .copy title="Key_Phrase" }
@@ -867,3 +865,27 @@ if let lastLoopCompleted = self.lastLoopCompleted, Date().timeIntervalSince(last
867
865
## Limit Loop HUD Update
868
866
869
867
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
+
{width="750"}
880
+
{align="center"}
881
+
882
+
These folder icon names are different from the directory names on the computer:
0 commit comments