Agent skill · software engineering · dpearson2699

background-processing

Schedule and execute background work on iOS using BGTaskScheduler. Use when registering BGAppRefreshTask for short background fetches, BGProcessingTask for long-running maintenance, BGContinuedProcessingTask (iOS 26+) for foreground-started work that continues in background, background URLSession downloads, or background push notifications. Covers Info.plist configuration, expiration handling, task completion, and debugging with simulated launches.

Why this skill is useful

Provides specific patterns and code snippets for implementing background processing in iOS that the AI wouldn't reliably generate on its own.

What it needs

Requires xcode installed locally. About 6k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.

What this skill does

Background Processing Register, schedule, and execute background work on iOS using the BackgroundTasks framework, background URLSession, and background push notifications. Contents Info.plist Configuration BGTaskScheduler Registration BGAppRefreshTask Patterns BGProcessingTask Patterns BGContinuedProcessingTask (iOS 26+) Background URLSession Downloads Background Push Triggers Common Mistakes Review Checklist References Info.plist Configuration Every task identifier must be declared in Info.plist under BGTaskSchedulerPermittedIdentifiers, or submit(:) throws BGTaskScheduler.Error.Code.notPermitted. Also enable the required UIBackgroundModes: In Xcode: target > Signing & Capabilities > Background Modes > enable "Background fetch" and "Background processing". BGTaskScheduler Registration Register handlers before app launch completes. In UIKit, register in application(:didFinishLaunchingWithOptions:); in SwiftUI, register in App.init(). UIKit Registration SwiftUI Registration BGAppRefreshTask Patterns Short-lived tasks (~30 seconds) for fetching small data updates. The system decides when to launch; earliestBeginDate is only a lower-bound hint. BGProcessingTask Patterns Long-running tasks (minutes) for maintenance, data processing, or cleanup. They run while the device is idle and can require external power; the same earliestBeginDate lower-bound rule applies. BGContinuedProcessingTask (iOS 26+) A task initiated in the foreground by a user action that continues running in the background. The system displays progress via a Live Activity. Conforms to ProgressReporting. Availability: iOS 26.0+, iPadOS 26.0+ Unlike BGAppRefreshTask and BGProcessingTask, this task starts immediately from the foreground. The system can terminate it under resource pressure, prioritizing tasks that report minimal progress first. Set expirationHandler for user or system cancellation, cancel in-flight work, and clean up partial output before reporting completion. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills dpearson2699/background-processing

View the source on GitHub

Browse the @skills marketplace