Repository navigation
Register historical export task during app launch - #2658
Conversation
ps2
left a comment
There was a problem hiding this comment.
Thanks, Damon. I checked both paths where the old code could register again: launch() runs from scene(_:willConnectTo:) and again from applicationProtectedDataDidBecomeAvailable when launch was deferred on a locked device. The second call registered the same identifier after launch had finished, and BGTaskScheduler aborts on that. Registering once in didFinishLaunching fixes it. Running the handler on main, so it reads criticalEventLogExportManager on the queue that sets it, and completing the task on failure are both improvements. It builds cleanly with the LoopWorkspace scheme.
One possible follow-up, separate from this PR: when iOS launches Loop in the background only for this task, no scene connects (or protected data isn't available), so the export manager is nil and the task now fails right away. Nothing reschedules it until the next full launch calls scheduleCriticalEventLogHistoricalExportBackgroundTask(). That was already the case before this change.
…seKit and MedtrumKit (#574) * Bump Loop and LoopKit Loop: two days of carb history on the Carbohydrates screen (LoopKit/Loop#2654), register the historical export background task at launch (LoopKit/Loop#2658), brighter app icon (LoopKit/Loop#2656). LoopKit: extend only an unresumed suspend to the overlay end date (LoopKit/LoopKit#689, fixes LoopKit/LoopKit#688), VoiceOver for checkmark lists and unset values (LoopKit/LoopKit#671). * Bump Loop, G7SensorKit, TidepoolService, OmnipodKit, EversenseKit and MedtrumKit * Bump EversenseKit for the fixed E3 current glucose test
Refs #2657.
Changes
Verification
Swift parsing, plist validation, and
git diff --checkpassed. Xcode rejected the workspace before compilation in the local build attempt. The locked-device launch path still needs device verification.