What is the Dropbox iOS app's equivalent of “fb://”?

╄→гoц情女王★ 提交于 2019-12-21 05:51:11

问题


Sorry, I can tell I don't entirely know what I'm talking about. For example, to open a URL for Facebook, the prefix is "fb://". Does anyone happen to know the prefix for Dropbox?

I'm pretty sure it has one, because in the new Dropbox API (1.0) it opens the Dropbox app from within your app to let the user log in, and the only way I know of doing this would be through one of those prefix things which I don't know what they are called.

I do not actually want to open a file in Dropbox. I actually want to detect whether Dropbox is installed on the iPhone, and the best way that I can think of to do this is with this method (shown for detecting whether the Facebook app is installed).

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]) {
    NSLog(@"Facebook is installed.");
} else {
    NSLog(@"Facebook is not installed.");
}

If you know a better way of detecting whether this app is installed please share.


回答1:


The only URL scheme listed in Dropbox's Info.plist is dbapi-1; that should work for what you're trying to do.

Edit: Just tried it out; it works (says "installed" on my device with Dropbox and "not installed" in the simulator).



来源:https://stackoverflow.com/questions/8697488/what-is-the-dropbox-ios-apps-equivalent-of-fb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!