Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

jem5519's avatar
jem5519
Helpful | Level 6
8 years ago
Solved

ObjectiveDropboxOfficial & SwiftyDropbox in same application

I have a third-party objc package that uses ObjectiveDropboxOfficial. I need to add some swift code that interacts with that package. The swift code would need to interact with the same dropbox manager that the objc (through ObjectiveDropboxOfficial) is using. Can I install both ObjectiveDropboxOfficial & SwiftyDropbox in the same project using cocoapods and have my swift code interact with the same underlying dropbox connection that ObjectiveDropboxOfficial is using. Say - set up the connection with the SwiftyDropbox and have the ObjectiveDropboxOfficial library see and use the same dropbox connection?

  • The SwiftyDropbox and ObjectiveDropboxOfficial SDKs aren't really meant to be used together. If you already have ObjectiveDropboxOfficial though, you can access and use that directly in Swift using a bridging header, containing the Objective-C import:

     

    #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>

    Then you can access DBClientsManager, DBUserClient, etc, from Swift.

2 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    The SwiftyDropbox and ObjectiveDropboxOfficial SDKs aren't really meant to be used together. If you already have ObjectiveDropboxOfficial though, you can access and use that directly in Swift using a bridging header, containing the Objective-C import:

     

    #import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>

    Then you can access DBClientsManager, DBUserClient, etc, from Swift.

  • jem5519's avatar
    jem5519
    Helpful | Level 6
    8 years ago

    Thanks for your reply. I am currently doing just that. The reason for the question is that I find working with the swiftydropbox library much more logical and enjoyable than making the swift version of the calls for the ObjectiveDropboxOfficial library. All of my addon dev for this library is all in Swift ;-)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

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!