Reputation: 1247
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.
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"dbapi-1://"]]) {}
if (![[DBSession sharedSession] isLinked]){ [[DBSession sharedSession] linkFromController:self]; }
Thanks in advance
Upvotes: 0
Views: 309
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