fetchCurrentDownloads(completionHandler:)
Fetches the contents of the manager’s download queue.
Declaration
func fetchCurrentDownloads(completionHandler: @escaping @Sendable ([BADownload], (any Error)?) -> Void)var currentDownloads: [BADownload] { get async throws }Parameters
- completionHandler:
The handler that processes the fetch results, which the system executes on an arbitrary queue.
Discussion
The completion handler takes the following parameters:
An array of scheduled and in-progress downloads.
An error if a problems occurs, or
nilif the method successfully fetches the current downloads.