SwiftyDropbox | Swift SDK for the Dropbox API v2 | SDK library
kandi X-RAY | SwiftyDropbox Summary
kandi X-RAY | SwiftyDropbox Summary
The Official Dropbox Swift SDK for integrating with Dropbox API v2 on iOS or macOS.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SwiftyDropbox
SwiftyDropbox Key Features
SwiftyDropbox Examples and Code Snippets
Community Discussions
Trending Discussions on SwiftyDropbox
QUESTION
For some time I have been trying to find a solution to authenticating Dropbox using their SwiftyDropbox SDK in a SwiftUI project, but this was to no avail.
The instructions provided in the readme use an AppDelegate and and SceneDelegate. The latter of which from what I understand is not possible with SwiftUI. I have been able to get the OAuth2 Safari window to launch, but DropboxClientsManager.authorizedClient is always nil.
...ANSWER
Answered 2022-Mar-18 at 19:20Finally, I figured it.
Setup info.plist as the SwiftyDropbox readme instructs.
QUESTION
I am cross-posting this from my initial question in DropBox forums. I think it would be good to have this here as well for swiftydropbox users.
I'm having trouble downloading entire folders to a local device via swiftyDropbox. I am doing the ListFolder and ListFolderContinue (which I observe that it chunks it to ~500 files per response) and appending it to a local array.
After which, I pass this array to files.download. However, I am finding out that in cases where my folder is >1000 files (txt files ~0.5-1kb in size), the download process will not start.
...ANSWER
Answered 2021-Aug-29 at 02:28According to Greg (swiftyDropbox)
Each 'client.files.download' call downloads one file by making one HTTPS request to the Dropbox API servers. Additionally, these calls run asynchronously, and will not block until the call completes. That is, calling 'client.files.download' will start the HTTPS request, but will itself return before it's complete and the response is fully received. (It just runs the supplied block once the request is done.) That being the case, in the code you showed here, you're actually starting 1000 connections in a row, at almost the same time, so it's likely exhausting your network connection. You should update your code to only submit one (or a few) of these at a time. You mentioned you tried a serial queue, but that may be running in to the same issue, since the actual requests run asynchronously.
So I was searching for other solutions when I came across this post https://stackoverflow.com/a/66227963/14414215 which greatly helped in my understanding of how semaphore works and how implementing semaphores (besides using dispatchGroups) is able to properly control the files.download calls.
QUESTION
I am using SwiftyDropbox to integrate Dropbox with my iOS App. I have completed all the configurations and implemented the code as in the documentation. User need to access the files in their dropbox account through my app. When I tried with 'generated access token' (got from dropbox console), I was able to access the files in my own account only. I understood that we will need to use the standard OAuth flow to obtain access tokens for other users.
Followed the steps as explained in https://developers.dropbox.com/oauth-guide
Constructed a Dropbox authorization URL, with my application’s client_id and redirect_uri.
Next step is to Call the /oauth2/token endpoint with my app’s client_secret to exchange the code for an access token. I am not sure how to implement this. If any of you have solved this before, please advise. Some portions of my code is given below.
override func viewDidLoad() { super.viewDidLoad()
...
ANSWER
Answered 2021-May-19 at 16:23When using the SwiftyDropbox SDK, you don't need to handle any of the /oauth2/authorize or /oauth2/token details directly. The SDK implements the app authorization flow for you. You should only implement the flow as documented here:
https://github.com/dropbox/SwiftyDropbox#configure-your-project
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SwiftyDropbox
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page