
Background Processing
Covers the three main flavors of iOS background work: BGAppRefreshTask for quick data syncs, BGProcessingTask for longer maintenance jobs, and the new BGContinuedProcessingTask in iOS 26+ for user-initiated work that keeps running when the app backgrounds. The patterns here handle the critical bits like Info.plist setup, registration timing (which must happen before app launch completes), and expiration handlers that fire when the system pulls the plug. Also includes background URLSession for downloads and push notification triggers. The examples show async/await patterns with proper cancellation, which is better than the older completion handler style you'll find in Apple's docs.
- skills.sh installs
- 4.1K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill background-processing --agent claude-codeInstalls into .claude/skills of the current project.
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
- 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.
<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:
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Debugging, Automation & Workflows, Mobile Development
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Healthkit4K
- Vision Framework4K
- Coreml3.9K
- Core Bluetooth3.9K
- Core Motion3.8K
- Natural Language3.8K
- Speech Recognition3.8K
- Device Integrity3.8K
- Contacts Framework3.8K
- Alarmkit3.8K
- Core Nfc3.8K
- Swift Codable3.8K
- Tipkit3.8K
- App Clips3.8K
- Permissionkit3.7K
- Energykit3.7K
- Shareplay Activities3.7K
- Weatherkit3.6K
- Activitykit3.5K
- Cloudkit3.5K
- Photokit3.4K
- Mapkit3.4K
- Swiftui Webkit3.4K
- Realitykit3.4K