1

Can anyone please help me to list all the files in a dropbox's specific folder using the V2 api, NOT V1.

There is no DBSession class anymore. Then how to let the app know that the user had already authenticated. In the V1 version we used to write something like-

[[DBSession sharedSession] isLinked];

But now we don't have DBSession.

Also we don't have DBRestClientDelegate. So, how can we use loadMetaData: method either. What are the replacement for these methods.

Can anyone please provide some sample code to list and download the files from dropbox using Dropbox SDK version V2.

Natasha
  • 6,651
  • 3
  • 36
  • 58
  • Refer https://blogs.dropbox.com/developers/2016/04/announcing-the-v1-to-v2-migration-guide/ that may help you – Piyush May 11 '17 at 12:43
  • Yes, I am going through the documentation for a week now. No, direct help for Objective C migration. For example, no mapping from the DBSession or DBRestClient classes. No mapping for the loadmetadata or other methods that was under the DBRestDelegate protocol. – Natasha May 11 '17 at 12:45

1 Answers1

0

To check if you have an account connected already, you can use authorizedClient as shown here:

https://github.com/dropbox/dropbox-sdk-obj-c/blob/master/Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/ViewController.m#L58

To list the files in a folder, you should use listFolder and listFolderContinue as shown here:

https://github.com/dropbox/dropbox-sdk-obj-c#rpc-style-request

To download files, you should use the download methods as shown here:

https://github.com/dropbox/dropbox-sdk-obj-c#download-style-request

Greg
  • 16,359
  • 2
  • 34
  • 44