cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: ObjectiveDropboxOfficial & SwiftyDropbox in same application

ObjectiveDropboxOfficial & SwiftyDropbox in same application

jem5519
Helpful | Level 6
Go to solution

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?

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

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.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

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
Helpful | Level 6
Go to solution

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 😉

Need more support?