cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation co

Re: -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation co

siso
Explorer | Level 3

Hi, I run through the same problem. Now I have been getting to this screen

 Screen Shot 2020-03-21 at 3.16.13 AM.png

But then nothing happens when I click on either of the two buttons.

This is the function I have in my app delegate

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
    if let authResult = DropboxClientsManager.handleRedirectURL(url) {
        switch authResult {
        case .success:
            print("Success! User is logged into Dropbox.")
        case .cancel:
            print("Authorization flow was manually canceled by user!")
        case .error(_, let description):
            print("Error: \(description)")
        }
    }
    return true
}

Also my keys are correct
Can you please help out ?
5 Replies 5

Greg-DB
Dropbox Staff

@siso Are you getting any errors in the console when you tap one of these?

When you tap either of these buttons, you should get redirected back to your third party app. To clarify, are you saying that that redirect does not occur, or that it does occur but you just don't get any result in the console?

If the redirect isn't occurring at all, please make sure you have your app key registered in the "db-" URL scheme under CFBundleURLTypes as documented here: https://github.com/dropbox/SwiftyDropbox#application-plist-file

siso
Explorer | Level 3

Nothing happens when I click on the buttons, it does not go back to my app.

and  my "URL type" is set this way Screen Shot 2020-03-24 at 12.21.40 AM.png

I can't change to 

CFBundleURLTypes

it goes back to URL types by itself.

I did every step listed on the GitHub carefully. I don't see what is happening honestly. 

Is there another way to go around this?

Greg-DB
Dropbox Staff

Thanks, that looks correct. That's the "Property List" view, so Xcode will translate the key names for you. To view the actual XML, where you would see "CFBundleURLTypes", you can right click on your Info.plist and "Open As" > "Source Code".

 

Anyway, I see you redacted your app key from the screenshot, but can you confirm in your actual app you have it registered without the quotes seen in your screenshot? It should look like "db-a1b2c3d4e5", without quotes, where "a1b2c3d4e5" would be your app key.

 

Also, can you double check that the app key you have there is exactly the same as the one you pass to DropboxClientsManager.setupWithAppKey?

siso
Explorer | Level 3

Yes, that is correct. I went through these steps  and did them how you just mentioned.

Greg-DB
Dropbox Staff

Thanks, in that case, can you let me know:

  • what version(s) of iOS are you seeing this issue with? I.e., iOS 13, 12, etc.
  • have you also tried this on a physical device? If so, do you see the issue there as well?
  • does your app use "scenes"?
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    siso Explorer | Level 3
What do Dropbox user levels mean?