background-processing

Schedule and orchestrate iOS background tasks using BGTaskScheduler APIs.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/femitz/flyby --skill background-processing-femitz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: background-processing
Source: https://github.com/femitz/flyby/tree/main/.agents/skills/background-processing
Command: npx skills add https://github.com/femitz/flyby --skill background-processing-femitz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps apps responsive by delegating long or periodic work to the system, allowing tasks to run in the background without blocking the foreground.

Core Features & Use Cases

  • Registers and schedules BGAppRefreshTask, BGProcessingTask, and BGContinuedProcessingTask (iOS 26+) to perform updates, maintenance, and data synchronization.
  • Integrates with Background URLSession and silent pushes to handle long-running transfers and events.
  • Provides guidance on Info.plist configuration, background modes, task expiration handling, and robust completion semantics for reliable background execution.

Quick Start

Register your BGTaskScheduler tasks at app startup, implement expiration handling, and schedule the next tasks after each completion.

Frequently Asked Questions about background-processing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I schedule and run iOS background tasks reliably using BGTaskScheduler?

To schedule iOS background tasks reliably, register BGAppRefreshTask and BGProcessingTask identifiers at app startup via BGTaskScheduler, then schedule the next task within each completion handler to maintain periodic execution.

What is the difference between BGAppRefreshTask and BGProcessingTask for background execution?

BGAppRefreshTask handles short periodic updates like data synchronization, while BGProcessingTask runs longer maintenance work requiring more system time, with both requiring proper expiration handling to avoid termination.

How do I handle task expiration in iOS background processing?

Handle iOS background task expiration by registering an expiration handler during task registration, saving state and calling the task's completion method immediately when the system signals time is running out.

Can I use background URLSession downloads with BGTaskScheduler for background data fetches?

Yes, background URLSession integrates with BGTaskScheduler to perform long-running background data fetches and transfers, allowing downloads to continue independently while the app is suspended.

What Info.plist configuration is needed for iOS background tasks and background modes?

Info.plist configuration requires declaring permitted background task identifiers under the BGTaskSchedulerPermittedIdentifiers key and enabling required Background Modes capabilities for tasks to schedule and execute.

Why are my scheduled BGAppRefreshTask tasks not running in the background?

BGAppRefreshTask scheduling fails when Info.plist lacks BGTaskSchedulerPermittedIdentifiers, tasks are not registered at app launch, or completion handlers are not called, causing the system to throttle future invocations.