New advertisers: 50% off your first month with code FIRSTMONTHSee slots
dpearson2699 avatar

Background Processing

Background work on iOS through BGTaskScheduler, covering refresh, processing, and continued-processing tasks with expiration handling.

skills.sh installs
4.1K
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers Info.plist permitted identifiers, UIBackgroundModes, and registration in UIKit and SwiftUI app launch paths
  • Includes patterns for BGAppRefreshTask, BGProcessingTask, and BGContinuedProcessingTask (iOS 26+), plus background URLSession and push triggers
  • Enforces expirationHandler cancellation and setTaskCompleted calls, since the system can revoke time at any moment
  • Designed for iOS developers scheduling short fetches, long maintenance jobs, or foreground-started work that must continue in background

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill background-processing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Background Processing

Register, schedule, and execute background work on iOS using the BackgroundTasks framework, background URLSession, and background push notifications.

Contents

Info.plist Configuration

Every task identifier must be declared in Info.plist under BGTaskSchedulerPermittedIdentifiers, or submit(_:) throws BGTaskScheduler.Error.Code.notPermitted.

<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
    <string>com.example.app.refresh</string>
    <string>com.example.app.db-cleanup</string>
    <string>com.example.app.export.*</string>
</array>

Also enable the required UIBackgroundModes:

Details

Repository
github.com/dpearson2699/swift-ios-skills
Category
Mobile Apps
First seen
Apr 16, 2026

More from dpearson2699/swift-ios-skills

All 94

Similar to Background Processing

More Mobile Apps