Giter Club home page Giter Club logo

Comments (8)

greg-db avatar greg-db commented on July 30, 2024

Unfortunately, the Dropbox iOS Swift SDK does not officially support SwiftUI. I'll pass this along as a request for official support for that, but I can't promise if/when that would be done. (There's a thread here that may be helpful though.)

from swiftydropbox.

3DCoded avatar 3DCoded commented on July 30, 2024

I tried the examples in the thread and they did not change the output. I am making a macOS app.

from swiftydropbox.

greg-db avatar greg-db commented on July 30, 2024

Thanks for following up. I'm sorry to hear that didn't help. I'll follow up here if/when the team officially adds support for SwiftUI.

from swiftydropbox.

3DCoded avatar 3DCoded commented on July 30, 2024

I don't think this is a problem with SwiftUI, as the URL Dropbox redirects to is: db-<APP KEY>://2/token?code=<CODE>&state=<STATE>, and not db-<APP KEY>://2/token?access_token=<ACCESS TOKEN>

from swiftydropbox.

3DCoded avatar 3DCoded commented on July 30, 2024

What format of redirect URI does SwiftyDropbox expect?

from swiftydropbox.

3DCoded avatar 3DCoded commented on July 30, 2024

Is there a way to manually parse the URL and get the Access Token?

from swiftydropbox.

3DCoded avatar 3DCoded commented on July 30, 2024

I found a workaround for now: I modify the url to set response_type=token and then I manually parse the URL and create a Dropbox Client from the Access Token.

from swiftydropbox.

greg-db avatar greg-db commented on July 30, 2024

Thanks for following up and clarifying. I'm glad to hear you got this working.

For reference though, unless SwiftUI is somehow complicating this, you shouldn't have to parse the URLs yourself. As long as you implement the authorization flow as shown in the documentation here, using authorizeFromControllerV2 (which is preferred, or authorizeFromController, which is deprecated, but not both), the SDK should handle this all for you automatically.

from swiftydropbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.