We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
leninsmannath
6 years agoExplorer | Level 3
Can't close the page after authentication
Hi
I use the below code for dropbox login
DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: self, openURL: {(url: URL) -> Void in UIApplication.shared.openUR...
- 6 years ago
Thanks! I see you don't actually have the "Handle redirect back into SDK" step implemented in your AppDelegate.swift. Please make sure to add that as documented.
Also, I noticed from your use of 'UIApplicationSceneManifest' in your Info.plist that this uses scenes, so make sure you also implement the handler in SceneDelegate.swift as noted here.
leninsmannath
6 years agoExplorer | Level 3
Yes, I did this all "CFBundleURLSchemes" configured with your "db-APPKEYHERE" URL scheme, and that you have the code in place to handle the redirect. And it working perfectly.
I attach a screenshot. when I click on the allow button the page is not dismissing.
Here is the video url. Please check this.
https://www.dropbox.com/s/p5tm1rb39ol74hx/WhatsApp%20Video%202020-04-21%20at%202.37.32%20PM.mp4?dl=0
Greg-DB
Dropbox Community Moderator
6 years agoThanks for sharing that. Do you get any errors or output in the console in Xcode though?
I see that the action is being submitted and that the SFSafariViewController is attempting to redirect to the custom URL scheme though, as it's momentarily shown in the title bar, so I would expect some error if that fails.
- leninsmannath6 years agoExplorer | Level 3
No error is shown in the Xcode console.
- Greg-DB6 years ago
Dropbox Community Moderator
Thanks for checking that. Can you also check:
- Are you using the latest version of the SwiftyDropbox SDK, currently v5.1.0? If not, please upgrade to that and try again.
- Does your app happen to use scenes? If so, please try the change covered here: https://github.com/dropbox/SwiftyDropbox/issues/259
Otherwise, please supply a small sample project that reproduces this issue so we can reproduce it here to investigate.
- leninsmannath6 years agoExplorer | Level 3
The dropbox version used is 5.1.0
I created a new project and do the same thing. The issue is still on that app too.
Here is the source code: https://github.com/leninsmannath/DropboxSampleApp
give your dropbox API key and check the above sample project.
Thanks
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!