<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot download a file from Dropbox to the iPad (uploads just fine) - in Swift. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86758#M2659</link>
    <description>&lt;P&gt;There are a few things that might cause delegate methods to not be called:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Your rest client is nil or is being released (e.g., by ARC) prematurely. &lt;/LI&gt;
&lt;LI&gt;You're making the call in a background thread that doesn't have a run loop. &lt;/LI&gt;
&lt;LI&gt;Your delegate method that should be called back has a typo in it. Unfortunately the SDK doesn't warn you if it can't find a delegate method to call; it just completes without telling anyone.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;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:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/contact" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers/contact&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jan 2015 07:48:28 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2015-01-21T07:48:28Z</dc:date>
    <item>
      <title>Cannot download a file from Dropbox to the iPad (uploads just fine) - in Swift.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86756#M2657</link>
      <description>&lt;P&gt;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:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;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)")
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would appreciate any help.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:45:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86756#M2657</guid>
      <dc:creator>Peter G.7</dc:creator>
      <dc:date>2019-05-29T09:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot download a file from Dropbox to the iPad (uploads just fine) - in Swift.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86757#M2658</link>
      <description>&lt;P&gt;Sorry.....one mistake: in the self.restClient.loadFile, "path" should read "dropboxPath"&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 07:47:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86757#M2658</guid>
      <dc:creator>Peter G.7</dc:creator>
      <dc:date>2015-01-21T07:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot download a file from Dropbox to the iPad (uploads just fine) - in Swift.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86758#M2659</link>
      <description>&lt;P&gt;There are a few things that might cause delegate methods to not be called:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Your rest client is nil or is being released (e.g., by ARC) prematurely. &lt;/LI&gt;
&lt;LI&gt;You're making the call in a background thread that doesn't have a run loop. &lt;/LI&gt;
&lt;LI&gt;Your delegate method that should be called back has a typo in it. Unfortunately the SDK doesn't warn you if it can't find a delegate method to call; it just completes without telling anyone.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;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:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/contact" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers/contact&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 07:48:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86758#M2659</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-01-21T07:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot download a file from Dropbox to the iPad (uploads just fine) - in Swift.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86759#M2660</link>
      <description>&lt;P&gt;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,&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jan 2015 04:28:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-download-a-file-from-Dropbox-to-the-iPad-uploads-just/m-p/86759#M2660</guid>
      <dc:creator>Peter G.7</dc:creator>
      <dc:date>2015-01-23T04:28:05Z</dc:date>
    </item>
  </channel>
</rss>

