|
| 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. |
0 commit comments