Skip to content

Commit 2b26878

Browse files
Add feature installer script for L&L-compatible installs
Provides an alternative install method where users run a script on a standard Loop clone after applying any L&L customizations. The script uses anchor-based text insertion and 3-way merges to adapt to whatever patches are already present, making all L&L customizations compatible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3657138 commit 2b26878

File tree

4 files changed

+1428
-1
lines changed

4 files changed

+1428
-1
lines changed

INSTALL.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Install FoodFinder + LoopInsights + AutoPresets
2+
3+
Add AI-powered food analysis, therapy settings insights, and automatic preset management to your Loop app — compatible with all Loop & Learn customizations.
4+
5+
## Quick Start
6+
7+
### 1. Build Loop the normal way first
8+
9+
Follow the standard LoopDocs build instructions through the cloning step:
10+
https://loopkit.github.io/loopdocs/build/step4/
11+
12+
```bash
13+
git clone --branch=main --recurse-submodules https://github.com/LoopKit/LoopWorkspace
14+
cd LoopWorkspace
15+
```
16+
17+
### 2. (Optional) Apply any Loop & Learn customizations you want
18+
19+
https://www.loopandlearn.org/custom-code/
20+
21+
All L&L patches (Profiles, Basal Lock, Negative Insulin, etc.) are compatible. Apply them first — our installer adapts to whatever's already there.
22+
23+
### 3. Run one command
24+
25+
```bash
26+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/TaylorJPatterson/LoopWorkspace/feat/installer/Scripts/install_features.sh)"
27+
```
28+
29+
That's it. The script downloads everything it needs, installs 77 new files, patches 11 existing files, updates the Xcode project, and validates the result.
30+
31+
### 4. Build in Xcode
32+
33+
1. Open `LoopWorkspace.xcworkspace` in Xcode
34+
2. Select your signing team
35+
3. Build and run (Cmd+R)
36+
37+
### 5. Enable features in the app
38+
39+
All features are **off by default**. Turn them on in Loop Settings:
40+
41+
- **FoodFinder** — AI-powered & barcode food analysis
42+
- **LoopInsights** — AI-powered therapy settings analysis
43+
- **AutoPresets** — Automate presets during motion
44+
45+
You'll need an AI API key (OpenAI, Anthropic, or Google) for the AI features. Enter it in FoodFinder Settings — LoopInsights shares the same key.
46+
47+
---
48+
49+
## Uninstalling
50+
51+
```bash
52+
./Scripts/install_features.sh --rollback
53+
```
54+
55+
Removes all feature files and restores Loop to its pre-install state (including any L&L patches you had applied).
56+
57+
## Updating
58+
59+
```bash
60+
./Scripts/install_features.sh --rollback
61+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/TaylorJPatterson/LoopWorkspace/feat/installer/Scripts/install_features.sh)"
62+
```
63+
64+
## L&L Compatibility
65+
66+
| L&L Customization | Compatible | Notes |
67+
|---|---|---|
68+
| Profiles | Yes | Our features insert below Profiles in Settings |
69+
| Basal Lock | Yes | Different code regions than our features |
70+
| Negative Insulin | Yes | Different code regions than our features |
71+
| Future Carbs 4h | Yes | Both modify CarbEntryView.swift in different regions; 3-way merge handles it |
72+
| Override Insulin Needs Picker | Yes | No overlapping files |
73+
| All other L&L patches | Yes | Our installer only modifies Loop submodule files |
74+
75+
## Troubleshooting
76+
77+
**"Anchor not found" error**: Your Loop version may be too old or too new. The installer targets Loop dev branch (v3.10.x+). Make sure you cloned the latest LoopWorkspace.
78+
79+
**Merge conflicts during patching**: If the installer reports conflicts, check the affected file for `<<<<<<<` conflict markers and resolve them manually.
80+
81+
**Xcode build errors after install**: Try a clean build (Cmd+Shift+K, then Cmd+R). If issues persist, run `--rollback` and re-install.
82+
83+
**plutil validation failure**: The Xcode project file update failed. The installer automatically restores the backup. Try again — if it persists, file an issue.

LoopConfigOverride.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) EXPERIMENTAL_FEATURES_ENABLED SIMULATORS_ENABLED ALLOW_ALGORITHM_EXPERIMENTS DEBUG_FEATURES_ENABLED
1414

1515
// Put your team id here for signing
16-
//LOOP_DEVELOPMENT_TEAM = UY678SP37Q
16+
LOOP_DEVELOPMENT_TEAM = 4S2EW2Q6ZW

0 commit comments

Comments
 (0)