965a506a43ef1c1b2f8e89e858eae7fb2d931d31
The Settings sliders called persistFuelSavingsSettings() on every value change, which rewrote all four keys — four UserDefaults writes and four keychain round trips per step, on the main thread, up to 90 times per drag. That is what made them stutter. saveFuelSavingsField(_:from:) writes just the field that moved, so a slider gesture touches one key. writeKeychain now uses SecItemUpdate and only falls back to SecItemAdd on errSecItemNotFound. Delete-then-add cost two round trips to securityd and briefly left the key holding no value at all — a window where the keychain, the authoritative mirror on read, could disagree with the app-group defaults. Tests pin the store half: a single-field save leaves the other three keys alone, and the whole-settings save still writes all four.
Description
FuelBoard iOS app - England-wide petrol station prices (widget + app)
155 MiB
Languages
Swift
99.1%
Shell
0.9%