Hi!
For our iOS Apps we are switching from the old Dropbox Api to the new Objective-C Api. In one app we use only the download function with dropbox. To achieve this, we implement
DBUserClient *client = [DBClientsManager authorizedClient];
DBDownloadDataTask *task = (DBDownloadDataTask* ) [client.filesRoutes downloadUrl:path overwrite: true destination: destinationUrl];
[task setResponseBlock:(^(DBFILESFileMetadata *result, DBFILESDownloadError *routeError, DBRequestError *networkError, NSData *fileData) {
// ....
})];
[task setProgressBlock:(^(int64_t bytesDownloaded, int64_t totalBytesDownloaded, int64_t totalBytesExpectedToDownload) {
// ...
})];
Everything works fine, but now we want to handle connection losses, such as sudden Wi-Fi disconnections or 100% network loss with Network Link Conditioner. We don't know how to handle connection losses. The only reaction by the framework is:
NSURLConnection finished with error - code -1001
Task <96CC094A-A747-44D4-A6A5-1B016F07AE06>.<0> HTTP load failed (error code: -999 [1:89])
The framework waits, until a working connection is available. But nothing will be triggered, we can't save the files which are not downloaded successfully. I wish to set a timeout somewhere. We have always the scenario that we must sync a huge amount of data, so we only want to download the files which are not downloaded successfully...
Can someone help? Greetings!