Forum Discussion

Wouter V.'s avatar
Wouter V.
Explorer | Level 4
8 years ago
Solved

Dropbox app returns db-<app_key>://1/connect instead of ://2/ failing setupwithappkey

Already migrated all users to V2. Everything fine.

Pulled 200+ commits from objective-c-official

 

When a new users attempts to link the app to their Dropbox, the Dropbox app opens -> they tap "Allow" -> the Dropbox app opens our app via the URL-scheme ... fine

 

However, the url passed to OpenWithURL = 

 

db-<app_key>://1/connect?oauth_token_secret=lalala-tatata=oauth2%3<someUUID>&uid=1234567&oauth_token=oauth2%3A

 

while the updated dropbox-objc-official codebase only accepts urls with host '2' , i.e.:   ://2/connect 

 

hence  - (BOOL)canHandleURL:(NSURL *)url returns NO

 

causing authentication to fail.

 

any pointers what changed, what am I doing wrong?

 

 

[EDIT]

When doing the exact same thing on a device that does not have the Dropbox app installed -> auth goes through SafariViewController -> user taps 'allow' -> URL-scheme call our app -> this time with ://2/ url -> everything works fine

  • Greg-DB's avatar
    Greg-DB
    8 years ago
    This issue is now fixed on master.

    Note for future reference though, we highly recommend only using the official release versions, and not just pulling from master. The commits on master may not be as well tested as the tagged release versions.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    Thanks for the report! Please use the latest SDK release, currently v3.3.4, instead of master for now to avoid this issue.
    • Wouter V.'s avatar
      Wouter V.
      Explorer | Level 4

      Thanks for the reply.

      "manually" parsing ://1/connect also worked - for now. We'll switch to the SDK

      Wouter

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff
        This issue is now fixed on master.

        Note for future reference though, we highly recommend only using the official release versions, and not just pulling from master. The commits on master may not be as well tested as the tagged release versions.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,942 PostsLatest Activity: 13 minutes ago
351 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!