You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Mull999's avatar
Mull999
Explorer | Level 3
7 months ago

SwiftyDropbox

I am attempting to integrate Dropbox into my SwiftUI project.  In the AppDelegate func(application...) I am getting an error stating that setupWithAppKey(<APP_KEY>)  is not a member type of DropboxClient Manager.  Any ideas on how to resolve>

  • iNeil's avatar
    iNeil
    Icon for Dropbox Engineer rankDropbox Engineer

    Hi Mull999,

    I'll be happy to help with any issues you're having with the Dropbox Swift SDK, but I'll need some more information. Please reply with:


    - the name and version of the platform and SDK/library you are using
    - the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    - the full text of any error or unexpected output

    • Mull999's avatar
      Mull999
      Explorer | Level 3

      Hi iNeil

      Thanks for responding.  I should say at the outset that I am a hobby coder and very much in learning mode.  I have a shopping list app that works as intended and now I want to be able to file the data as backup using my Dropbox files.  So I have started to build a test app to learn how to get access to Dropbox through a SwiftUI app.  I read the advice given on Github SwiftyDropbox version10.0. and implemented the requirements

      I successfully attached the package SwiftyDropbpox 10.0.7 to my test app.  However I get an error in my AppDelegate, as follows:-

      func application(_application: UIApplication, didFinishLaunchingWithOptions launchOptions: DropboxClientsManager.setupWithAppKey("<APP_KEY>") -> Bool { return true }

      The error says setupWithAppKey is not a member type of DropboxClientsManager.

      The app fails at that point so I have not got further into testing.   However, I am thinking perhaps the SwiftyDropbox package is not compatible with SwiftUI.

      I hope you can offer some advice.

       

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        Thanks for following up. It should be possible to use SwiftyDropbox in a SwiftUI project. The SwiftyDropbox readme does have some notes throughout about how to use it in SwiftUI.

         

        For reference, how did you install the SwiftyDropbox package?

         

        Also, do you have 'import SwiftyDropbox' in your AppDelegate?

         

        Finally, is that the actual 'func application...' code you have? It looks like it may be a copy/paste mistake, as it doesn't appear to be a valid definition (e.g., it's missing a ")", etc.). I believe it should look something like this:

         

            func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
                DropboxClientsManager.setupWithAppKey("<APP_KEY>")
                return true
            }

         

         

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 7 hours ago
325 Following

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 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!