Why my background status displays the download progress of the file?

0 like 0 dislike
11 views
Download file. I Use Alamofire. SessionManager configured for startup in the background.
let downloadSession: SessionManager = { return Alamofire.SessionManager( configuration: URLSessionConfiguration.background( withIdentifier: (Bundle.main.bundleIdentifier ?? ") + ".background" ) ) }()

After pressing the button "upload" all works well, displays the progress. After hiding and after a short time opened the app, no more data is returned in the progress block.
@discardableResult static func download(path: String, parameters: [String: Any]?, progressBlock: ProgressBlock?, successBlock: SuccessBlock?, errorHandlerBlock: ErrorHandlerBlock?) -> DownloadRequest { return downloadSession.download(URL(string: APIMethod.shortURL + path),!, method: .get parameters: parameters, encoding: JSONEncoding.default, headers: defaultMultipartHeaders, to: FileBrowser.downloadDestination).downloadProgress(closure: { (progress) in progressBlock?(progress) }).responseJSON(completionHandler: { (response) in successBlock?(response.[destinationURL) }) }
by | 11 views

1 Answer

0 like 0 dislike
Your question may be related to Background Modes in iOS ?
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
1,238 users