Hello,
I am trying to use the following code to download data from Dropbox using the Vs2 API:
NSString *filePath = @"/joelLockFolderV2_1489675832.409768.tsl";
[[client.filesRoutes downloadData:filePath]
setResponseBlock:^(DBFILESFileMetadata *result, DBFILESDownloadError *routeError, DBRequestError *error,
NSData *fileContents) {
if (result) {
NSLog(@"%@\n", result);
NSString *dataStr = [[NSString alloc] initWithData:fileContents encoding:NSUTF8StringEncoding];
NSLog(@"%@\n", dataStr);
} else {
NSLog(@"%@\n%@\n", routeError, error);
}
}];
When I try this I receive the following error:
2017-03-16 15:58:35.759 xctest[78431:5712864] (null)
DropboxClientError[{
NSError = "Error Domain=NSURLErrorDomain Code=-1 \"unknown error\" UserInfo={NSErrorFailingURLKey=https://api-content.dropbox.com/2/files/download, NSLocalizedDescription=unknown error, NSErrorFailingURLStringKey=https://api-content.dropbox.com/2/files/download}";
}];
I have checked and the file at filePath exists. I've found that various Api calls correctly work. I am having the same problem with
[client.filesRoutes downloadUrl:filePath overwrite:TRUE destination:ril]
And:
[[client.filesRoutes uploadUrl:remoteFilePath inputUrl:localURL]
I've tried setting 'NSAppTransportSecurity' to Allow Arbitary loads.
Is there anything I am missing...?
Regards,
Joel