One Logo Pool Ball
BackgroundTasks · IOS API REFERENCE

BGTaskScheduler

class · iOS 13.0+ · SDK 27.1

class BGTaskScheduler

Members (9)

get · iOS 13.0+

errorDomain

TypeScript
static get errorDomain(): string
Swift declaration
class let errorDomain: String
get · iOS 13.0+

shared

TypeScript
static get shared(): BGTaskScheduler
Swift declaration
class var shared: BGTaskScheduler { get }
get · iOS 26.0+

supportedResources

TypeScript
static get supportedResources(): BGContinuedProcessingTaskRequest_Resources
Swift declaration
class var supportedResources: BGContinuedProcessingTaskRequest.Resources { get }
method · iOS 13.0+

cancelAllTaskRequests

TypeScript
cancelAllTaskRequests(): void
Swift declaration
func cancelAllTaskRequests()
method · iOS 13.0+

cancel

TypeScript
cancel(identifier: string): void
Swift declaration
func cancel(taskRequestWithIdentifier identifier: String)
method · iOS 13.0+

getPendingTaskRequests

TypeScript
getPendingTaskRequests(completionHandler: ((arg0: Array<BGTaskRequest>) => void)): void
Swift declaration
func pendingTaskRequests() async -> [BGTaskRequest]
method · iOS 13.0+

register

TypeScript
register(identifier: string, queue: (_Dispatch_DispatchQueue) | null, launchHandler: ((arg0: BGTask) => void)): boolean
Swift declaration
func register(forTaskWithIdentifier identifier: String, using queue: dispatch_queue_t?, launchHandler: @escaping (BGTask) -> Void) -> Bool
method · iOS 27.0+

submitTaskRequest

TypeScript
submitTaskRequest(taskRequest: BGTaskRequest, completionHandler: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func submitTaskRequest(_ taskRequest: BGTaskRequest) async throws
method · iOS 13.0+ · Deprecated in iOS 27.0

submit

TypeScript
submit(taskRequest: BGTaskRequest): void
Swift declaration
func submit(_ taskRequest: BGTaskRequest) throws

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

BGTaskScheduler.init()

inherited init: clang: 'init' is unavailable

All BackgroundTasks types →