Releases: stefanprojchev/ForgeBackgroundTasks
Releases · stefanprojchev/ForgeBackgroundTasks
Release list
1.1.0
Conventions refactor
Applied the project-wide layered conventions and canonical pragma marks. No public API removals, no behavior changes.
BackgroundTaskprotocol intoDomain/Services/BackgroundTasks/.BackgroundTaskContextandBackgroundTaskSchedulevalue types intoDomain/Models/Entities/.BackgroundTaskRegistryimplementation intoData/Services/BackgroundTasks/.- Normalized pragma marks to canonical
Dependencies/Init/Implementation/Private.
1.0.1
Switch local path dependencies (ForgeCore, ForgeObservers) to GitHub-hosted versions so consumers can resolve via SPM.
ForgeBackgroundTasks 1.0.0
First public release.
Features
BackgroundTaskRegistry— registers tasks withBGTaskScheduler, schedules them, and dispatches system launches to your task implementations. Handles the expiration/completion race with atomic state tracking so you can't double-complete a task.BackgroundTaskprotocol — identifier,requiresNetwork,requiresProtectedData,schedule, and anexecute(context:)method for the actual work.BackgroundTaskSchedule—.refresh(BGAppRefreshTaskRequest) and.processing(BGProcessingTaskRequest) variants with interval, network, and charging requirements.BackgroundTaskContext— runtime context withisCancelledclosure, connectivity status, and protected-data availability.
Pre-checks
Before calling execute(), the registry checks:
- Protected data — if the task
requiresProtectedDataand the device is locked, the launch is skipped and the task is rescheduled. - Network — the task's
requiresNetworkflag is surfaced to the action viacontext.connectivity.
Dependency protocols
Takes ConnectivityObserving and ProtectedDataObserving as dependencies, so you can use ForgeObservers or provide your own implementations.
Tests
13 tests covering registration, duplicate handling, concurrent registration, schedule enum, and context propagation.
Requirements
- iOS 18+
- Swift 6.3+ (Xcode 26 or later)
- Task identifiers declared in
BGTaskSchedulerPermittedIdentifiersin Info.plist processingbackground mode (for.processingschedule variants)
Installation
.package(url: "https://github.com/stefanprojchev/ForgeBackgroundTasks.git", from: "1.0.0")Documentation
Full docs: https://stefanprojchev.github.io/ForgeBackgroundTasks/