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
C. Tim
10 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!
- Ashok M.2New member | Level 1
Hi Gregory,
Could you please share current details and state of DBv2 (swifty).
As per following migration guide for v1 to v2, it says Objective-C SDK is coming out in Aug 2016.
https://blogs.dropbox.com/developers/2016/04/announcing-the-v1-to-v2-migration-guide/
Are you guys planning to release a separate v2 SDK that is purely Objective-C or it's still the Swifty SDK with Objective-C support?
Thanks in advance.
- Greg-DBDropbox Staff
Hi Nicola, the official Objective-C SDK is available at the link in Stephen's post:
- Zhenya T.New 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 ;)
- Steve M.Dropbox Staff
As I said, we plan to add support for Objective-C users. I don't have an ETA yet, but once we finish up the Swift SDK and take it out of beta, it's going to be the next thing we work on in the library.
- RTS S.Helpful | Level 6
If this comes in phases .. it would be good to get the Files.Metadata classes available in Objective-C. I find it convenient to keep meta associated with a Dropbox path in my App. I need to handle all the various Files.Metadata sub classes.
The Users.Account class would also be useful, but sine any app only has one to a few accounts ... this is less needed (i.e. it can be easily wrapped)
- RTS S.Helpful | Level 6
I think it's unlikely that this will change soon ... Swifty is bootstrapped from Alamofire which is also a Swift base framework However Alamofire is derived from an Open Source Objective-C library.
In general I like the style of the new interface ... passing blocks/closures for the completion of a request as opposed to the delegate model of the previous objective-c API. But this can still be done in Objective-C ... In fact I wrapped the previous API in a layer that looks a lot like the new API. I still need the wrapper layer now ... because I need to call it from Objective-C ... but the wrapper is pretty trivial.
- Steve M.Dropbox Staff
Thanks for all the detailed feedback! As requested, let me explain some of our thinking. I'm just one person who worked on this, but I'll do my best to explain the thought process.
When we first started work on SDKs for API v2, we looked at a few options for how to support iOS developers:
- We could write an Objective-C SDK and encourage Swift developers to use that too.
- We could write a Swift SDK and encourage Objective-C developers to use that too.
- We could write both an Objective-C SDK and a Swift SDK and encourage developers to use the SDK in the language of their choice.
#3 is somewhat appealing in that it allows for building SDKs very specifically tailored to the features of each language. But it has the downside of doubling the support/maintenance cost.
#1 is possible, but the experience of using an Objective-C library from Swift is not great, and then the SDK can't take advantage of great Swift features like enums.
We ultimately decided to take the approach in #2 and build only a Swift SDK. The runtime size is indeed a concern, but we expect Swift development to become more and more popular over time. We'll eventually deprecate API v1, but we haven't set a timeline for that yet. I suspect that by the time API v1 is fully deprecated, this won't be much of a concern anymore.
It turns out that making a Swift SDK easily accessible from Objective-C code is harder than we anticipated! When we came to this realization, we considered a few options for how to make the SDK work better for all iOS developers:
- We could rework the Swift SDK to be more Objective-C-friendly. (As an example, we'd have to drop our use of non-numeric enums.) We rejected this on the grounds that this "least-common denominator" approach would make the SDK worse overall. We recently took the Swift SDK out of beta, and we now intend to keep its interface stable.
- We could write a separate Objective-C SDK. This has a somewhat high maintenance cost, so for now we're trying to avoid doing this.
- We could write a compatibility layer into the Swift SDK that made calling it from Objective-C easy. This is our current plan of record. It lets us keep the nice features of Swift for Swift developers, but it should make it easy for Objective-C developers to adopt the SDK and not have to do work themselves writing a wrapper.
Because we're not that deep into our investigation of #3 yet, it's possible we'll discover things that make us want to revisit the decision.
For those of you (RTS?) who built your own wrappers on top of the Swift SDK, would you mind sharing what worked well/poorly?
- Joris M.New member | Level 2
- Greg-DBDropbox Staff
Thanks everyone for all of the feedback! We read everything and sincerely appreciate the time taken to write it.
To be clear, we hear and understand the need for Objective-C support. As Steve mentioned earlier in the thread, we intended for Objective-C support to be available, but made a misjudgment about the technical barriers to making that possible. That unfortunately means it will take us longer than we intended to offer it.
That said, the good news is that API v1 a.k.a. the Core API is not deprecated, so you can continue to use it. We don't intend on deprecating the Core API for some time, and we will offer a long span of time for migration once we do.
- TK K.New member | Level 1
Thanks for the news, also very happy v1 will continue. If I could forward one more positive thought, if/when ya'll do v2 for objC it would be nice if it was an evolution not a revolution ;)
Just curious being a newb - what is in the v2 api functionally that is not in v1 other than oauth2 instead of oauth1? I am actually pretty happy with v1...
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,882 PostsLatest Activity: 4 hours agoIf 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!