cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

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: 
Highlighted

dropbox-sdk-obj-c issue

Explorer | Level 3

Hi there!

 

I am new with your API but now I got a task to update it. 

I am trying to migrate our app from API v1 to API v2 and this is like hopeless fighting.  

 

First of all, we don't use any dependency manager. I tried to add as subfolder in our project and it failed to build. It complains about that some header files are not found.

 

Today I did it with Cocoa pod. It seems like it fixed problem and all headers are in. 

But then I follow instructions from GET STARTED part on github and again a lot of troubles.

(https://github.com/dropbox/dropbox-sdk-obj-c#handling-the-authorization-flow)

 

According to this guide I should use [DBClientsManager setupWIthKey:@<API_KEY>]

but xcode complains that there is no DBClientsManager class and suggets to use 

DropboxClientsManager.  I have replaced it.

Then when I try the authorization flow part Xcode again stops me and complains that openUrl is deprecated. 

 

BTW, here https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/ you can find DropboxClientsManager class but not DBClientsManager.

 

Could you please point me what I am doing wrong? Is any possibility to add 

ObjectiveDropboxOfficial manually as framework? and what wrong with documentation? 

 

Thanks

 

 

 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: dropbox-sdk-obj-c issue

Dropboxer
Dropboxer
Yes, using authorizedClient is the right way to check that.

And that's correct, the new SDK doesn't use DBRestClientDelegate or DBNetworkRequestDelegate.

To determine if an entry is a file or folder, you can use isKindOfClass to check the type, as shown here:

https://github.com/dropbox/dropbox-sdk-obj-c#response-handling-edge-cases

View solution in original post

4 Replies 4
Highlighted

Re: dropbox-sdk-obj-c issue

Dropboxer
Dropboxer

Thanks for the post! We don't currently offer the API v2 Objective-C SDK just as a framework file, but I'll be sure to pass this along as a feature request. We highly recommend using a package manager, as it helps stay up to date with updates. You can find the three supported installation methods in the README here.

 

Also, thanks for pointing out the DBClientsManager/DropboxClientsManager issue! The documentation is just out of date. We'll get that fixed up. It should be DropboxClientsManager.

 

Finally, the openURL message should only be a warning, and not an error, correct? It shouldn't be preventing you from building the app. Let me know if not though.

Highlighted

Re: dropbox-sdk-obj-c issue

Explorer | Level 3

Thanks for reply!

 

Ok, I will check there more. I have added ObjectiveDropboxOfficial and it works now, thank you

 

Yes, it is just warning and I still can build project. 

 

I have some questions about its usage:

before we used [[DBSession sharedSession] isLinked] to check whether user is linked or not. Is any easy possibility to check it now?

I can check it with 

[DropboxClientsManager authorizedClient];

!= nil || [DropboxClientsManager authorizedTeamClient] != nil)  ?

 

Also  DBRestClientDelegate and  DBNetworkRequestDelegate - we don't need them now ? 

I have searched some similar questions in the community but no success.

 

Before I used DBMetadata class - property  isDirectory. How can check whether it DBFILESMetada is directory or not.

I see DBFILESMetada has name, pathLower, pathDisplay.

Is there an easy way (like isDirectory before) to check item type?

 

Sorry for simply questions - I am new with these API.

 

Thanks

 

Highlighted

Re: dropbox-sdk-obj-c issue

Dropboxer
Dropboxer
Yes, using authorizedClient is the right way to check that.

And that's correct, the new SDK doesn't use DBRestClientDelegate or DBNetworkRequestDelegate.

To determine if an entry is a file or folder, you can use isKindOfClass to check the type, as shown here:

https://github.com/dropbox/dropbox-sdk-obj-c#response-handling-edge-cases

View solution in original post

Highlighted

Re: dropbox-sdk-obj-c issue

Explorer | Level 3

Thanks, Greg! It helps a lot. 

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?