<?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 Why Delete Method is not working according to Doc? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259615#M15104</link>
    <description>&lt;P&gt;Hi, I am trying delete according to instruction from &lt;A href="https://github.com/dropbox/SwiftyDropbox" target="_self"&gt;DropBox&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt; client?.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response, error in
            if let response = response {
                print(response)
            } else if let error = error {
                switch error as CallError {
                case .routeError(let boxed, let requestId):
                    print("RouteError[\(requestId)]:")
                    
                    switch boxed.unboxed as Files.DeleteError {
                    case .pathLookup(let lookupError):
                        switch lookupError {
                        case .notFound:
                            print("There is nothing at the given path.")
                        case .notFile:
                            print("We were expecting a file, but the given path refers to something that isn't a file.")
                        case .notFolder:
                            print("We were expecting a folder, but the given path refers to something that isn't a folder.")
                        case .restrictedContent:
                            print("The file cannot be transferred because the content is restricted...")
                        case .malformedPath(let malformedPath):
                            print("Malformed path: \(malformedPath)")
                        case .other:
                            print("Unknown")
                        }
                    case .pathWrite(let writeError):
                        print("WriteError: \(writeError)")
                    // you can handle each `WriteError` case like the `DeleteError` cases above
                    case .other:
                        print("Unknown")
                    }
                case .internalServerError(let code, let message, let requestId): break
                }
            }
        } // End Of client?
        
        DropboxClientsManager.authorizedClient?.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response, error in
            if let response = response {
                print(response)
            } else if let error = error {
                switch error as CallError {
                case .routeError(let boxed, let requestId):
                    print("RouteError[\(requestId)]:")
                    
                    switch boxed.unboxed as Files.DeleteError {
                    case .pathLookup(let lookupError):
                        switch lookupError {
                        case .notFound:
                            print("There is nothing at the given path.")
                        case .notFile:
                            print("We were expecting a file, but the given path refers to something that isn't a file.")
                        case .notFolder:
                            print("We were expecting a folder, but the given path refers to something that isn't a folder.")
                        case .restrictedContent:
                            print("The file cannot be transferred because the content is restricted...")
                        case .malformedPath(let malformedPath):
                            print("Malformed path: \(malformedPath)")
                        case .other:
                            print("Unknown")
                        }
                    case .pathWrite(let writeError):
                        print("WriteError: \(writeError)")
                    // you can handle each `WriteError` case like the `DeleteError` cases above
                    case .other:
                        print("Unknown")
                    }
                case .internalServerError(let code, let message, let requestId): break
                }
            }
        } // End Of DropboxClientsManager.authorizedClient?&lt;/PRE&gt;
&lt;P&gt;But Showing Error message "&amp;nbsp;&lt;STRONG&gt;Tuple pattern has the wrong length for tuple type '(Box&amp;lt;(Files.DeleteError)&amp;gt;, String?, String?, String?)' (aka '(Box&amp;lt;Files.DeleteError&amp;gt;, Optional&amp;lt;String&amp;gt;, Optional&amp;lt;String&amp;gt;, Optional&amp;lt;String&amp;gt;)')&lt;/STRONG&gt;"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also I have a Question.&lt;/P&gt;
&lt;P&gt;***What is the differrence between &lt;STRONG&gt;client?&lt;/STRONG&gt; and&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;DropboxClientsManager.authorizedClient?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;N.B. I am using Xcode 8.3.1 and swift 3&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:16:14 GMT</pubDate>
    <dc:creator>Irtiza_Khan</dc:creator>
    <dc:date>2019-05-29T09:16:14Z</dc:date>
    <item>
      <title>Why Delete Method is not working according to Doc?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259615#M15104</link>
      <description>&lt;P&gt;Hi, I am trying delete according to instruction from &lt;A href="https://github.com/dropbox/SwiftyDropbox" target="_self"&gt;DropBox&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt; client?.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response, error in
            if let response = response {
                print(response)
            } else if let error = error {
                switch error as CallError {
                case .routeError(let boxed, let requestId):
                    print("RouteError[\(requestId)]:")
                    
                    switch boxed.unboxed as Files.DeleteError {
                    case .pathLookup(let lookupError):
                        switch lookupError {
                        case .notFound:
                            print("There is nothing at the given path.")
                        case .notFile:
                            print("We were expecting a file, but the given path refers to something that isn't a file.")
                        case .notFolder:
                            print("We were expecting a folder, but the given path refers to something that isn't a folder.")
                        case .restrictedContent:
                            print("The file cannot be transferred because the content is restricted...")
                        case .malformedPath(let malformedPath):
                            print("Malformed path: \(malformedPath)")
                        case .other:
                            print("Unknown")
                        }
                    case .pathWrite(let writeError):
                        print("WriteError: \(writeError)")
                    // you can handle each `WriteError` case like the `DeleteError` cases above
                    case .other:
                        print("Unknown")
                    }
                case .internalServerError(let code, let message, let requestId): break
                }
            }
        } // End Of client?
        
        DropboxClientsManager.authorizedClient?.files.deleteV2(path: "/test/path/in/Dropbox/account").response { response, error in
            if let response = response {
                print(response)
            } else if let error = error {
                switch error as CallError {
                case .routeError(let boxed, let requestId):
                    print("RouteError[\(requestId)]:")
                    
                    switch boxed.unboxed as Files.DeleteError {
                    case .pathLookup(let lookupError):
                        switch lookupError {
                        case .notFound:
                            print("There is nothing at the given path.")
                        case .notFile:
                            print("We were expecting a file, but the given path refers to something that isn't a file.")
                        case .notFolder:
                            print("We were expecting a folder, but the given path refers to something that isn't a folder.")
                        case .restrictedContent:
                            print("The file cannot be transferred because the content is restricted...")
                        case .malformedPath(let malformedPath):
                            print("Malformed path: \(malformedPath)")
                        case .other:
                            print("Unknown")
                        }
                    case .pathWrite(let writeError):
                        print("WriteError: \(writeError)")
                    // you can handle each `WriteError` case like the `DeleteError` cases above
                    case .other:
                        print("Unknown")
                    }
                case .internalServerError(let code, let message, let requestId): break
                }
            }
        } // End Of DropboxClientsManager.authorizedClient?&lt;/PRE&gt;
&lt;P&gt;But Showing Error message "&amp;nbsp;&lt;STRONG&gt;Tuple pattern has the wrong length for tuple type '(Box&amp;lt;(Files.DeleteError)&amp;gt;, String?, String?, String?)' (aka '(Box&amp;lt;Files.DeleteError&amp;gt;, Optional&amp;lt;String&amp;gt;, Optional&amp;lt;String&amp;gt;, Optional&amp;lt;String&amp;gt;)')&lt;/STRONG&gt;"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also I have a Question.&lt;/P&gt;
&lt;P&gt;***What is the differrence between &lt;STRONG&gt;client?&lt;/STRONG&gt; and&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;DropboxClientsManager.authorizedClient?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;BR /&gt;N.B. I am using Xcode 8.3.1 and swift 3&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:16:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259615#M15104</guid>
      <dc:creator>Irtiza_Khan</dc:creator>
      <dc:date>2019-05-29T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Whey Delete Method is not working according to Doc?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259668#M15108</link>
      <description>&lt;P&gt;Apologies for the trouble, it looks like the SwiftyDropbox readme is a little out of date.&amp;nbsp;This line:&lt;/P&gt;
&lt;PRE&gt;case .routeError(let boxed, let requestId):&lt;/PRE&gt;
&lt;P&gt;should instead be:&lt;/P&gt;
&lt;PRE&gt;case .routeError(let boxed, let userMessage, let errorSummary, let requestId):&lt;/PRE&gt;
&lt;P&gt;I'll ask the team to update that in the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;`DropboxClientsManager.authorizedClient` is a singleton you can use for convenience for storing the `DropboxClient` object. The `client` variable in the examples also just refers to a `DropboxClient` object. You can use whichever you want.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 18:24:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259668#M15108</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-09T18:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Whey Delete Method is not working according to Doc?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259946#M15127</link>
      <description>but when i try to check &lt;BR /&gt;if(client != nil){&lt;BR /&gt;}&lt;BR /&gt;else{&lt;BR /&gt;print("Nil")&lt;BR /&gt;}&lt;BR /&gt;Then it prints NIl in console. Why?</description>
      <pubDate>Thu, 11 Jan 2018 13:37:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259946#M15127</guid>
      <dc:creator>Irtiza_Khan</dc:creator>
      <dc:date>2018-01-11T13:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Whey Delete Method is not working according to Doc?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259962#M15131</link>
      <description>The `client` variable would just be a variable like any other in your app. If the `nil` check is coming back like that, it means it is not currently set. You need to set and manage it in your code. (For that reason, `DropboxClientsManager.authorizedClient` is generally more convenient.)</description>
      <pubDate>Thu, 11 Jan 2018 15:13:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Delete-Method-is-not-working-according-to-Doc/m-p/259962#M15131</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-11T15:13:02Z</dc:date>
    </item>
  </channel>
</rss>

