0
アップロードにAlamofireを使用しています。私は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
}
でも
背景セッションでの画像や動画をアップロードする必要が私のserver.Iに複数の画像や動画をアップロードする必要がありますが、私は私に知らせてSIGABRTを背景に行ったとき、私のアプリがクラッシュです私が間違ってやっていること