← ClaudeAtlas

backgroundtaskslisted

Route BackgroundTasks implementation tasks to the correct Knowledge Contracts -- background task registration and scheduling, task execution and expiration handling, processing task constraints and conditions, and background refresh and widget timeline hookup. Use when registering a task identifier with BGTaskScheduler.register(forTaskWithIdentifier:using:launchHandler:), declaring BGTaskSchedulerPermittedIdentifiers, submitting a BGAppRefreshTaskRequest/BGProcessingTaskRequest, reading earliestBeginDate, handling a BGTask/BGAppRefreshTask/BGProcessingTask in a launch handler, setting expirationHandler, calling setTaskCompleted(success:), setting requiresNetworkConnectivity/requiresExternalPower, or scheduling background refresh that feeds a widget. v1 is BGTaskScheduler-based scheduling and execution only -- no BGContinuedProcessingTask, no legacy Background Fetch (setMinimumBackgroundFetchInterval, performFetchWithCompletionHandler), no unrelated background modes (background audio, background location, VoIP
caglarbaranbora/Apple-Agent-Kit · ★ 1 · AI & Automation · score 70
Install: claude install-skill caglarbaranbora/Apple-Agent-Kit
# BackgroundTasks — Foundations Skill ## Purpose Route BackgroundTasks implementation tasks to the minimum required BackgroundTasks Knowledge Contracts. v1 scope is scheduling and running deferred background work through `BGTaskScheduler` -- registration, submission, execution, expiration handling, processing constraints, and the hand-off point where background-refreshed data reaches a widget -- not `BGContinuedProcessingTask`, not legacy Background Fetch, not unrelated background modes, and not `URLSession` background transfer. ## Routing Load only the contracts relevant to the task. All paths relative to knowledge/backgroundtasks/. - Registering a task identifier with `BGTaskScheduler.shared.register(forTaskWithIdentifier:using:launchHandler:)`; declaring `BGTaskSchedulerPermittedIdentifiers`; choosing `BGAppRefreshTaskRequest` vs `BGProcessingTaskRequest`; submitting with `submit(_:)`; or reasoning about `earliestBeginDate` -> background-task-registration-and-scheduling.md - Handling the `BGTask` delivered to a `launchHandler` (casting to `BGAppRefreshTask`/`BGProcessingTask`); setting `expirationHandler`; calling `setTaskCompleted(success:)`; or re-submitting a request for the next occurrence -> task-execution-and-expiration-handling.md - Setting `BGProcessingTaskRequest.requiresNetworkConnectivity`/`requiresExternalPower`; or deciding whether work belongs on `BGProcessingTaskRequest` versus `BGAppRefreshTaskRequest` -> processing-task-constraints-and-condition