Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have this code:
DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: self) { (url: URL) in print("**!!!**") UIApplication.shared.open(url, options: [:]) { success in print("**!!!") self.navigationItem.prompt = "**!!!" } print("*****") self.navigationItem.prompt = "*****" }
I don't think the closure is running at all. It is the openURL argument. None of the print statements show. None of the changes to navigationItem.prompt show. When I comment the intire UIApplication.shared.open(url:options:completionHandler:) statement, there are no changes.
Does anyone know what the matter is?
Any help will be appreciated.
I think the last reply of this post answers the question: #M11267 .
Is it correct that if the Dropbox app is not installed then openURL is not called?
That code will only get run once the user returns to your app after authorizing it in the app authorization flow. Are you successfully completing the app authorization flow?
First, please make sure you've implemented all of the pieces as documented here:
https://github.com/dropbox/SwiftyDropbox#handling-the-authorization-flow
Note that whether the flow is handled by the browser or by the official Dropbox app, the flow works the same way; the user is redirected back to your app, and that code block should be run.
Hi there!
If you need more help you can view your support options (expected response time for a 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!