Comments (3)
downloadedLength
not being updated is likely just an oversight. No clear reason to me why it's not being updated.
from gtm-session-fetcher.
It sounds like you're setting the destinationFileURL
.
In that case, we're not updating downloadedLength
like we do with data tasks (no destination file URL), however you can provide a download progress block and receive the current status as it updates.
For totalBytesExpectedToWrite
, all network clients are at the mercy of the server sending the Content-Length header, which I believe Google Drive does not send when responding to an HTTP GET request. To show a useful progress indicator, in the past I've needed to get the file size from elsewhere (e.g. making a HEAD request before starting the fetch).
With destinationFileURL
set, the completion handler's NSData
will be intentionally nil
. All data is written directly to the file as it's received and not retained in memory. This is useful for large files, files not intended to be used immediately, etc. So the fetcher does not re-load the bytes into memory on completion, avoiding file I/O and memory allocation that are potentially unneeded.
from gtm-session-fetcher.
That's pretty much what I guessed, though I don't understand why setting downloadedLength
should differ between data and destination tasks, it's useful in both cases?
from gtm-session-fetcher.
Related Issues (20)
- Build error due to missing platforms in the SPM manifest file HOT 6
- Crashed: com.google.GTMSessionFetcher.NSURLSessionDelegateQueue (QOS: UNSPECIFIED) HOT 1
- iOS 14.1 App getting terminated in background HOT 3
- +[GTMSessionUploadFetcher load] method takes too much time at app startup HOT 2
- If allow insecure request we don't need check security HOT 1
- Fetch
- _GTMBridgeAssertValidSelector build failure (GTMSessionFetcher 1.6.0) HOT 8
- [GTMSessionFetcherService] Allow decorating HTTP headers per request HOT 4
- Static Analysis nullability warning from Xcode 13.1
- `GTMFetcherAuthorizationProtocol` cannot be implemented in Swift
- Improve async/await support HOT 2
- Insecure API when using in React Native iOS app HOT 1
- Critical Severity Risk - Insecure Transport: Weak SSL Protocol HOT 1
- Critical Severity Risk - Privacy Violation HOT 1
- High Severity Risk - Insecure Storage: HTTP Response Cache Leak HOT 1
- GTMFetcherStandardUserAgentString() is slow
- -[GTMSessionFetcherServiceTest testThreadingStress] is flaky HOT 1
- Concurrency issue in GTMFetcherCleanedUserAgentString()
- iOS 17 New required reason API HOT 9
- ios17 incompatibility with Pod (flutter) HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtm-session-fetcher.