<?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 Cannot initialize optional DBDownloadUrlTask to nil in Swift 3 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-initialize-optional-DBDownloadUrlTask-to-nil-in-Swift-3/m-p/219763#M11608</link>
    <description>&lt;P&gt;I'm trying to integrate the Objective-C SDK (version 3.0.9) in a Swift 3 project. We could do it with the same project in its Swift 2.3 version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Swift 3 we get the following error:&lt;/P&gt;
&lt;PRE&gt;nil cannot initialize specified type 'DBDownloadUrlTask?'
    fileprivate var fileDownloadTask: DBDownloadUrlTask? = nil&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same line compiled fine in the Swift 2.3 project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing the line to:&lt;/P&gt;
&lt;PRE&gt;fileprivate var fileDownloadTask: DBDownloadUrlTask&amp;lt;AnyObject, AnyObject&amp;gt;? = nil
&lt;/PRE&gt;
&lt;P&gt;Gets rid of the error, but not sure that is a good solution.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:22:57 GMT</pubDate>
    <dc:creator>DarioJG</dc:creator>
    <dc:date>2019-05-29T09:22:57Z</dc:date>
    <item>
      <title>Cannot initialize optional DBDownloadUrlTask to nil in Swift 3</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-initialize-optional-DBDownloadUrlTask-to-nil-in-Swift-3/m-p/219763#M11608</link>
      <description>&lt;P&gt;I'm trying to integrate the Objective-C SDK (version 3.0.9) in a Swift 3 project. We could do it with the same project in its Swift 2.3 version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Swift 3 we get the following error:&lt;/P&gt;
&lt;PRE&gt;nil cannot initialize specified type 'DBDownloadUrlTask?'
    fileprivate var fileDownloadTask: DBDownloadUrlTask? = nil&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The same line compiled fine in the Swift 2.3 project.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Changing the line to:&lt;/P&gt;
&lt;PRE&gt;fileprivate var fileDownloadTask: DBDownloadUrlTask&amp;lt;AnyObject, AnyObject&amp;gt;? = nil
&lt;/PRE&gt;
&lt;P&gt;Gets rid of the error, but not sure that is a good solution.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:22:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-initialize-optional-DBDownloadUrlTask-to-nil-in-Swift-3/m-p/219763#M11608</guid>
      <dc:creator>DarioJG</dc:creator>
      <dc:date>2019-05-29T09:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot initialize optional DBDownloadUrlTask to nil in Swift 3</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-initialize-optional-DBDownloadUrlTask-to-nil-in-Swift-3/m-p/220254#M11644</link>
      <description>I believe Swift 3 got more strict with its generics, so DBDownloadUrlTask&amp;lt;AnyObject, AnyObject&amp;gt; should be equivalent  to DBDownloadUrlTask. It's more explicit, but it should be fine.</description>
      <pubDate>Tue, 09 May 2017 17:04:34 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-initialize-optional-DBDownloadUrlTask-to-nil-in-Swift-3/m-p/220254#M11644</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-05-09T17:04:34Z</dc:date>
    </item>
  </channel>
</rss>

