Repository navigation
fix: re-arm daily limits iOS drops and show when they can't start - #137
Merged
Merged
Conversation
ykisana
marked this pull request as draft
November 19, 2026 05:46
Contributor
Author
|
This was suggested by AI via code triage only, going to verify if real issue first and then verify fix |
- Register daily limits again when iOS no longer lists their activity, the way schedules already do. An unchanged set used to return early, so the limits stayed off until the next day's first open or an edit. - When iOS refuses to start them (its 20 schedules-and-timers cap or another error), say so on Max Daily Limits and Status instead of only logging it. - Debug builds log when limits register, and whether the monitor kept or dropped each threshold and why.
ykisana
force-pushed
the
fix/daily-limit-registration
branch
from
November 19, 2026 17:12
7c47d48 to
e34940a
Compare
ykisana
marked this pull request as ready for review
November 19, 2026 17:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Three ways Max Daily Limits could be off with nothing showing it:
UsageLimitService.registerAllreturned early whenever the saved fingerprint matched, without checking that iOS still listsusageLimits_daily. Developers report that iOS sometimes drops registered activities. The limits then stayed off until the next day's first open or an edit. Schedules already re-register when iOS no longer lists them.Fix
When nothing changed but iOS no longer lists
usageLimits_daily, Normal registers the limits again.When iOS refuses to start them:
Debug builds log to
CallbackLog:These logs pinned down the bug fix: count a new daily limit from when it's set on its first day #135 fixes: on a device, a limit added after its apps were already over fired 0.1 s after registering and was dropped.
Tests
mainwith the real services and a fake iOS activity center:usageLimits_daily), so any number of limits uses one of the 20 slots.