kmp-workmanager
When to Use This Skill
Use when:
- Running a deferred task that must complete even if the app is backgrounded (push token upload, log flush)
- Scheduling periodic background syncs (hourly cache refresh, daily cleanup)
- Running a long-running network or DB task on iOS that needs more than the 30-second background time
- Retrying failed network operations with exponential backoff
Trigger keywords: WorkManager, background work, background task, BackgroundScheduler, BGTaskScheduler, BGProcessingTask, BGAppRefreshTask, one-time work, periodic work, retry backoff, CoroutineWorker, background sync, deferred work, background job, WorkRequest, KMP background.
Freshness rule: WorkManager 2.9+ uses CoroutineWorker as the primary API — do not
use the deprecated ListenableWorker directly. On iOS, BGTaskScheduler identifiers must
be declared in Info.plist under BGTaskSchedulerPermittedIdentifiers; the scheduler
silently ignores tasks that are not declared. iOS background time for BGAppRefreshTask
is up to ~30 seconds; BGProcessingTask allows minutes but requires requiresNetworkConnectivity
or requiresExternalPower constraints.