<?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: In the DropboxSDK for iOS, are DBRestClients required to be an instance variable of a UIViewController? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/In-the-DropboxSDK-for-iOS-are-DBRestClients-required-to-be-an/m-p/186016#M7874</link>
    <description>&lt;P&gt;Your DBRestClient instance presumably went out of scope at the end of viewWillDisappear, so the&amp;nbsp;object&amp;nbsp;got&amp;nbsp;deleted. Although you don't necessarily need&amp;nbsp;it to be an instance variable on a UIViewController, it does need to be retained somehow.&lt;/P&gt;
&lt;P&gt;I should point out that the&amp;nbsp;API you're using has been deprecated and will stop working next year. See&amp;nbsp;&lt;A href="https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/" target="_blank" rel="nofollow noreferrer"&gt;https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/&lt;/A&gt; for details.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Aug 2016 00:50:02 GMT</pubDate>
    <dc:creator>Steve M.</dc:creator>
    <dc:date>2016-08-29T00:50:02Z</dc:date>
    <item>
      <title>In the DropboxSDK for iOS, are DBRestClients required to be an instance variable of a UIViewController?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/In-the-DropboxSDK-for-iOS-are-DBRestClients-required-to-be-an/m-p/186015#M7873</link>
      <description>&lt;P&gt;I am using the DropboxSDK for iOS, and I am trying to have a Dropbox fetch occur inside viewDidAppear(animated:). However, whenever I create a local DBRestClient inside viewDidAppear and call&amp;nbsp;loadMetadata(forPath:), the delegate methods are never called. I am not presented with any errors or anything. It simply seems as though no requests were made. Being in viewDidAppear, the client should have been on the UI thread which has a run loop. I also tried explicitly asking&amp;nbsp;GCD to run the declaration of the client as well as the loadMetadata call on the main thread but that did not work either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a desperate attempt to figure out what was wrong, I followed the tutorial to an absolute tee and the only difference was that the tutorial had the DBRestClient as an instance variable on the UIViewController. I thought there was no way that could actually be the problem. I pulled my DBRestClient variable out as an instance variable and sure enough everything worked suddenly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is: why does the DBRestClient have to be an instance variable on a UIViewController?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: I am using Swift with an ObjC Bridging Header, but this should not have any affect on the actual workings of the code to my knowledge.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:30:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/In-the-DropboxSDK-for-iOS-are-DBRestClients-required-to-be-an/m-p/186015#M7873</guid>
      <dc:creator>Nick A.23</dc:creator>
      <dc:date>2019-05-29T09:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: In the DropboxSDK for iOS, are DBRestClients required to be an instance variable of a UIViewController?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/In-the-DropboxSDK-for-iOS-are-DBRestClients-required-to-be-an/m-p/186016#M7874</link>
      <description>&lt;P&gt;Your DBRestClient instance presumably went out of scope at the end of viewWillDisappear, so the&amp;nbsp;object&amp;nbsp;got&amp;nbsp;deleted. Although you don't necessarily need&amp;nbsp;it to be an instance variable on a UIViewController, it does need to be retained somehow.&lt;/P&gt;
&lt;P&gt;I should point out that the&amp;nbsp;API you're using has been deprecated and will stop working next year. See&amp;nbsp;&lt;A href="https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/" target="_blank" rel="nofollow noreferrer"&gt;https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/&lt;/A&gt; for details.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 00:50:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/In-the-DropboxSDK-for-iOS-are-DBRestClients-required-to-be-an/m-p/186016#M7874</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2016-08-29T00:50:02Z</dc:date>
    </item>
  </channel>
</rss>

