Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello,
I'm trying to integrate SwiftyDropbox (newest version 7.0.1 built as xcframework, running on iPad/iPhone with iOS 14.6) into my application ExplainEverything (current store version uses old version of Dropbox SDK - ObjectiveDropboxOfficial 3.7.0 and it works without any problems).
I have problem with the authorizing with SwiftyDropbox. I'm using the following code to login:
```
let scopeRequest = ScopeRequest(scopeType: .user,
scopes: ["files.metadata.read", "files.content.read", "files.content.write", "account_info.read"],
includeGrantedScopes: false)
DropboxClientsManager.authorizeFromControllerV2(
UIApplication.shared,
controller: controller,
loadingStatusDelegate: nil,
openURL: { url in UIApplication.shared.open(url, options: [:], completionHandler: nil) },
scopeRequest: scopeRequest
)
```
For logout I use:
```
DropboxClientsManager.unlinkClients()
```
It works fine for the first time. The authorizing is successfull and all another requests works also properly, e.g. listing folders, download/upload file. But if I logout and then try to login again, the SDK returns error - `SwiftyDropbox.OAuth2Error error 11. The operation couldn't be completed. `. The next try is successful and the next next try returns error. So it works like: success, failure, sucess, failure, ...
The error occurs if I have Dropbox application installed on my device (official app from App Store). So the login process uses this app.
It doesn't occur without this application being installed (the SDK uses internally SFSafariViewController then).
Can You give me some advice what I'm doing wrong or is this some kind of known issue?
Thanks, Łukasz
Thanks for the detailed report! We'll look into it.
Update:
The problem occurs if I make the mentioned steps quickly: login, logout, login, ...
It works properly if I wait few seconds (5-10s) before trying to login next time.
Also the problem doesn't occur on every device, e.g. on iPad Pro 9,7'' (2016) or iPad Air (2013) it doesn't occur. But it occurs for example on the following devices: iPad Pro 12.9'' 4th gen (2020), iPad Pro 10.5'' (2017), iPhone 7 plus, iPhone 6 plus. (all mentioned devices with newest iOS 14.6)
Thanks for following up with the additional information!
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!