Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

objective c - Does the DropBox app on iOS have a URL scheme?

I would like to be able to launch the DropBox app within my app. Therefore I would like to know if the DropBox app has a URL scheme that I can use to call openURL, something like this, except I don't know what this string should be.

NSURL *myURL = [NSURL URLWithString:@"dropbox://"];
[[UIApplication sharedApplication] openURL:myURL];
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The only thing you can do with the Dropbox url-scheme is connect your Dropbox App to it. Like this:

var key = "[YOUR API KEY]";
var secret = "[YOUR API SECRET]";
var apiversion = "1";

window.open("dbapi-1://"+apiversion+"/connect?k="+key+"&s="+secret);

Normally the dropbox-app responses by opening your iOS app with the following scheme:

db-[YOU API KEY]://connect?oauth_token=SOMETOKEN&oauth_token_secret=SOMEOATHTOKEN&uid=SOMETHING

or with:

db-[YOU API KEY]://cancel

Got this from looking at the Dropbox SDK for iOS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...