本文介绍了Dropbox iOS应用等效于“ fb://”是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

对不起,我可以告诉我我不完全知道我在说什么。例如,要打开Facebook的URL,前缀为 fb://。有人碰巧知道Dropbox的前缀吗?

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?

我很确定它有一个,因为在新的Dropbox API(1.0)中,它将从您的应用程序内部打开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.

我实际上并不想在Dropbox中打开文件。我实际上是想检测iPhone上是否安装了Dropbox,而我想到的最好方法就是使用这种方法(显示为检测是否安装了Facebook应用)。

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.

推荐答案

Dropbox的Info.plist中列出的唯一URL方案是 dbapi-1 ;

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

编辑:只是尝试了一下;它可以正常工作(例如,在我的设备上使用Dropbox安装了已安装,而在模拟器中则安装了未安装)。

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

这篇关于Dropbox iOS应用等效于“ fb://”是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 09:52