Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
C. Tim
11 years agoNew member | Level 2
To use API v2 in iOS platform, we need an objective-C version
We didn't use swift in our app development for iOS devices.
To use API v2 in iOS platform, we need an objective-C version!!!
Please kindly provide an objective-C version!
53 Replies
Replies have been turned off for this discussion
- Greg-DB11 years ago
Dropbox Community Moderator
Thanks for the request! I'm sending it along.
For reference, I believe it's possible to use a Swift library in an Objective C app, though unfortunately I don't have any instructions for doing so available.
- Paradigm M.11 years agoNew member | Level 1
Agreed. Most iOS apps are still being written in Objective-C. We really need an Obj-C version of the API.
- Mobile H.11 years agoNew member | Level 1
Is there still no ObjectiveC sdk on github or I can't find it? Or at least an Objective-C project that is using the swift dropbox library.
- Steve M.11 years ago
Dropbox Staff
For API v2, we only have a Swift SDK and currently don't have plans to build an Objective-C SDK. As Greg mentioned, you should be able to just use the Swift SDK from your Objective-C code.
For API v1, the iOS SDK is written in Objective-C, and the code can be downloaded from https://www.dropbox.com/developers-v1/core/sdks/ios.
- Paradigm M.11 years agoNew member | Level 1
This decision is insane.
Is there any technical justification you can give me that will allow me to convince my PM that our team now has to learn another programming language to use your API? Box, S3, GDrive, OneDrive and iCloud all have Objective-C apis available. Do you really feel that you'll be able to compete for IOS developer mindshare with just a Swift-based API?
I strongly urge you to reconsider.
- Steve M.11 years ago
Dropbox Staff
I'm a bit confused. Did you run into trouble just using the Swift SDK from your Objective-C project? Or is there some other reason you can't (or don't want to) do that?
- Steve M.11 years ago
Dropbox Staff
For those who haven't tried it yet, I just tried and believe that we'll need to expose the Swift classes to Objective-C explicitly by inheriting from NSObject and adding the @objc decorator. (I was able to make some progress just by making the Dropbox class "@objc public class Dropbox : NSObject", but I believe there is more work to do to expose the full functionality.)
We'll try to make sure it's easy to use the Swift SDK from Objective-C code before the Swift SDK is taken out of beta. Please let me know if you have other concerns about using the Swift SDK from your Objective-C projects.
- Mobile H.11 years agoNew member | Level 1
> We'll try to make sure it's easy to use the Swift SDK from Objective-C code before the Swift SDK is taken out of beta.
Nice, I hope you'll come up with something because my knowledge of swift is worse than my french and my french is rather poor.
- Steve M.11 years ago
Dropbox Staff
Back-pedaling here a bit, sorry. After further investigation yesterday, it looks to me like making it easy to call SwiftyDropbox from Objective-C is going to be considerably more work than I thought. I don't think Objective-C support will make it into the initial release of the SDK, but it is something we will look at after the initial release.
We'd welcome contributions from the community here if perhaps someone on this thread is more experienced with mixing Swift and Objective-C than we are. The biggest challenge identified so far is the use of enums.
- Zhenya T.11 years agoNew member | Level 1
I don't think that full support of Objective-C is reasonable here. Cause Swift provides more good development patterns based on its structs and enums that are not accessible from Objective-C. The best solution here from my point of view is If you want to use Swift SDKs from your Objective-C code than write the wrapper in Swift that will handle the paradigm difference as you like. May be it will push you to write projects in Swift. It's good since 2.0 version ;)
About 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!