background_runtime_ios
iOS implementation of the background_runtime Flutter plugin.
Uses Swift, Background URLSession, AVPlayer, and MPRemoteCommandCenter.
Supports iOS 15.0+.
Capabilities
- Downloads: Background URLSession with download/resume task APIs. Progress callbacks via
EventChannel. - Audio playback: AVPlayer (streaming, async).
addPeriodicTimeObserverfor drift-free progress.KVOonAVPlayerItem.statusfor ready/failed state. - Notifications: Control center / lock screen integration via
MPNowPlayingInfoCenterwith album art (MPMediaItemPropertyArtwork).MPRemoteCommandCenterhandles Previous/Next/Play/Pause/Stop. - Notification actions: Command events mapped to
NotificationActionenum and sent to Dart vianotificationActionEventsEventChannel. - Permissions: Audio permission requested on main thread when
enableAudiois enabled.