Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have been going around in circles trying to solve this problem. I can send files to Dropbox no problem, but cannot download them. All the delegate methods get called for sending, but the methods for downloading the files do not get called. Specifics: Core API. using Swift. iOS 8.1, using xcode. Checked and rechecked all my code. Follows is my related code:
func xferToLocal() {
let dirPaths:[String]? = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.AllDomainsMask, true) as? [String]
let directories:[String] = dirPaths!
docsDir = directories[0]
docsDirDAT = docsDir + "/" + filenameDAT
let dropboxPath = "/" + filenameDAT
self.restClient.loadFile(path, intoPath:docsDirDAT)
}
func restClient(client:DBRestClient, loadedFile dropboxPath:NSString, contentType:NSString, metadata:DBMetadata) {
println("File loaded into path: \(docsDirDAT)")
}
func restClient(client:DBRestClient, loadFileFailedWithError error:NSError) {
println("There was an error loading the file: \(error)")
}
I would appreciate any help.
Sorry.....one mistake: in the self.restClient.loadFile, "path" should read "dropboxPath"
There are a few things that might cause delegate methods to not be called:
If none of that seems to be it though, please open an API ticket, with a sample project that reproduces the issue if possible, so we can look into it:
As it turn out, the download wasn’t failing at all. I just wasn’t giving dropbox enough time to download the file before I started executing other commands, causing the app to crash. Many thanks to the Dropbox support team. Class act,
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!