Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Bernadetha S.
9 years agoNew member | Level 1
SwiftyDropbox not working in iPad device
I'm working on integration SwiftyDropbox with my iOS app, it works fine in simulator get file list, download and upload, unfortunately not in device (an iPad).
After success login, tried to get fol...
Greg-DB
Dropbox Community Moderator
9 years agoThanks for the project! Unfortunately, the issue doesn't reproduce for me using this project on a test device. The files and folders do get listed for me.
Looking at your code though, one thing that might be an issue is how you're using your client object. That is, you're letting client be your authorizedClient, but that might then go out of scope before the response comes in (asynchronously). This could be a timing issue, which might explain why we see it inconsistently.
Try replacing these lines:
if let client = Dropbox.authorizedClient {
with:
if ((Dropbox.authorizedClient) != nil) {
And:
client.files.listFolder(path: dbPath).response { response, error in
with:
Dropbox.authorizedClient!.files.listFolder(path: dbPath).response { response, error in
If that doesn't help, it does sound like a network issue, so I'd recommend checking you can access api.dropboxapi.com on the networks you've tried.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!