Total upload count is 0 when uploading file to Firebase using iOS SDK
<p>I'd like to show users a progress bar when uploading video files recorded within an iOS app to Firebase, so I'm using the <code>observeStatus</code> feature of the SDK:</p>

<pre><code>// Create a root reference
FIRStorageReference *storageRef = [_storage reference];

// Create a reference to the video
FIRStorageReference *videoRef = [storageRef child:uuidString];

// Upload the file
FIRStorageUploadTask* uploadTask = [videoRef putFile:url metadata:nil];

[uploadTask observeStatus:FIRStorageTaskStatusProgress handler:^(FIRStorageTaskSnapshot *snapshot) {
    // A progress event occurred
    double percentComplete = 100.0 * (snapshot.progress.completedUnitCount) / (snapshot.progress.totalUnitCount);

    NSLog(@"Video with ID %d recording upload progress: %f, completed unit count %lld, total unit count %lld", video.videoId, percentComplete, snapshot.progress.completedUnitCount, snapshot.progress.totalUnitCount);
}];
</code></pre>

<p>However, 'Total Unit Count' always seems to be 0, meaning the calculated percent complete goes a bit bonkers with the whole divide-by-0 situation:</p>

<pre><code>Video with ID 3 recording upload progress: inf, completed unit count 163922, total unit count 0
</code></pre>

<p>Am I doing something wrong? Following the docs as described <a href="https://firebase.google.com/docs/storage/ios/upload-files#full_example" rel="nofollow" title="here">here</a>.</p>

<p>[Replicated also in Swift]</p>