gurmandeep
gurmandeep

Reputation: 1247

Is it possible to get files from Dropbox and Google Drive files application in IOS sdk

I'm developing an application in which the user can select his/her file from Dropbox or Google drive and download and share it to other users.

  1. Can we check that is Google drive installed as we can check dropbox with help of below code :-

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"dbapi-1://"]]) {}

  1. Once we know that the Dropbox and Google drive is installed. Can we get the files/folder from the installed application or Is it the standard process to check and then the dropbox list of files and display it manually with help of below code.

if (![[DBSession sharedSession] isLinked]){ [[DBSession sharedSession] linkFromController:self]; }

Thanks in advance

Upvotes: 0

Views: 309

Answers (1)

Greg
Greg

Reputation: 16940

As Paulw11 commented, if UIDocumentMenuViewController suits your needs, you can certainly use that.

Alternatively, Dropbox also offers an API you can use to integrate Dropbox functionality into your app. For Objective-C on iOS, you should use the Dropbox API v2 Objective-C SDK.

There are instructions for getting started with that, as well as samples for listing files and folders, etc..

(Note that the code from your question is for the deprecated Dropbox API v1 iOS SDK. That should no longer be used since API v1 is being retired later this year.)

Upvotes: 1

Related Questions