Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

rbazaldua's avatar
rbazaldua
Explorer | Level 4
6 years ago

-canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed

 

I am getting the errors below after the following swift code:

       DropboxClientsManager.authorizeFromController(UIApplication.shared,

                                                      controller: self,

                                                      openURL: { (url: URL) -> Void in

                                                        UIApplication.shared.openURL(url)

        })

 

 

 

2019-05-08 20:11:56.664761-0500 DropBoxExample2[313:14412] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

2019-05-08 20:11:56.665540-0500 DropBoxExample2[313:14412] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

2019-05-08 20:11:56.670493-0500 DropBoxExample2[313:14412] Warning: Attempt to present <SwiftyDropbox.MobileSafariViewController: 0x103814600> on <DropBoxExample2.ViewController: 0x102d1bbd0> whose view is not in the window hierarchy!

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Those '10814' errors can be ignored. They just mean that the official Dropbox iOS app isn't installed, so the app authorization flow is sent through Safari instead.

    Is the app authorization flow not working for you though? E.g., is the app authorization page not appearing at all? If not, based on that third message, that's likely because you're triggering the flow before your app's view is finished loading. In that case, try calling `authorizeFromController` only once the user taps on a particular button (as opposed to in, say, `viewWillAppear` or the like).

    • rbazaldua's avatar
      rbazaldua
      Explorer | Level 4

      Thanks Greg it works now!

      My authorization page was not coming up,  so I moved the `authorizeFromController` to its own func and only once the user taps on a button it is called. I am still getting those errors but I am ignoring them.