0
我正在使用Alamofire进行上传。我需要多张图片和视频上传到我的server.I需要在后台会话甚至SIGABRT:从后台会话不支持上传来自NSData的任务
let bundleIdentifier = Bundle.main.bundleIdentifier
let configuration = URLSessionConfiguration.background(withIdentifier: bundleIdentifier!)
configuration.timeoutIntervalForRequest = 200 // seconds
configuration.timeoutIntervalForResource = 200
self.alamoFireManager = Alamofire.SessionManager(configuration: configuration)
I am using above code setup alamofire for background configuration.
alamoFireManager?.upload(data!, with: (router))
.uploadProgress { progress in // main queue by default
print("Upload Progress: \(progress.fractionCompleted)")
}.validate()
.responseJSON { [weak self] response in
}
图片和视频上传到,但我的应用程序崩溃是我去的时候背景SIGABRT
让我知道我做错了什么,