Commit 1d4120b
committed
fix(updates): Wire up development channel filtering in Sparkle
**Problem:**
- Users with development updates enabled could see dev releases in the appcast
- BUT Sparkle was filtering them out because allowed channels weren't configured
- The 'Receive development updates' switch changed the feed URL but didn't tell Sparkle to accept development channel items
**Root Cause:**
Missing implementation of Sparkle's `allowedChannels(for:)` delegate method. Without this, Sparkle filters out any items tagged with `<sparkle:channel>development</sparkle:channel>`, even if they're in the feed.
**Solution:**
1. Added `cachedAllowedChannels` property to AppDelegate
2. Implemented `allowedChannels(for:)` SPUUpdaterDelegate method
3. Update `cachedAllowedChannels` when feed URL changes:
- Development enabled: Set to ["development"]
- Development disabled: Set to [] (stable only)
**Testing:**
✅ Build: PASS (no errors, warnings only)
✅ Manual: Toggling development updates now correctly shows/hides dev releases
✅ User confirmed: Can switch back and forth, sees d✅ User co26✅ User confirmed: Can switch back and forth, sees d✅ User co26✅ User coers can opt into pre-release testing.1 parent 723058f commit 1d4120b
2 files changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
234 | 242 | | |
235 | 243 | | |
236 | 244 | | |
237 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
238 | 257 | | |
239 | 258 | | |
240 | 259 | | |
| |||
0 commit comments