I have to upload 3 Images to Firebase. I'd like to monitor the upload progress of all three images via NSProgress.
let currentUploadTask:StorageUploadTask = uploadPath.putData(data, metadata: nil) { (storageMetaData, error) in
if error != nil{
//TODO: Error handling
}else{
print("Upload Finished")
}
}
You get to the NSProgress object via currentUploadTask.snapshot.progress
And in fact you get the progress percentage if you run currentUploadTask.snapshot.progress.fractionCompleted
Once I combine all "Firebase progresses" to one big progress things fall apart.
let progress:Progress = Progress(totalUnitCount: 3)
progress.addChild(currentUploadTask.snapshot.progress!, withPendingUnitCount: currentUploadTask.snapshot.progress!.totalUnitCount)
// Observe progress.fractionCompleted ----> always 0.0
Thanks in advance :)