iOS文档/文件类型关联 - 通配符UTI? [英] iOS Document/File type associations - wildcard UTI?

查看:479
本文介绍了iOS文档/文件类型关联 - 通配符UTI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,它是一个通用文件管理器。我想在使用QLPreviewController,UIDocumentInteractionController等的应用程序中出现Open in ...功能,以便能够向我的应用程序发送任何文件类型。

I have an app which is something of a generic file manager. I would like the "Open in..." functionality present in apps using QLPreviewController, UIDocumentInteractionController, etc to be able to send my app any filetype.

我创建了一个文档类型但是类型是否设置为*,public。*或类似组合我无法让应用程序显示非特定情况(如果我将UTI更改为com,它确实有效。 adobe.pdf,例如)。

I have created a document type but whether the "Types" is set to " * ", "public. * ", or similar combinations I can't get the app to display for non-specific cases (it does work if I change the UTI to com.adobe.pdf, for example).

在Mac OS X上,可以将应用程序设置为所有文件类型的通用查看器 - 这在iOS上是不可能的?

On Mac OS X one can set an app to be a generic viewer of all file types - is this not possible on iOS?

编辑

通过文档,我发现有只有少数原始UTI类型,其他所有类型都继承

Going through the docs, I found there are only a handful of primitive UTI types, from which all others inherit

public.item
public.content 
public.database
public.calendar-event
public.message 
public.contact 
public.archive 
public.url-name
public.executable
com.apple.resolvable 

其中很多都是cl早期从不将成为文件的实例。

Of these, many are clearly never going to be instances of files.

我可能过于雄心勃勃,试图创建一个通配符测试:我尝试了public.item和它通过邮件处理pdf文件。由于文档声明public.item是物理层次结构的基本类型,这可能意味着通配符,即public.item = *

I may have been overly ambitious trying to create a wildcard test: I tried public.item and it worked on a pdf file from mail. Since the docs state that public.item is the "Base type for the physical hierarchy.", that could mean this is the wildcard, ie " public.item = * "

最糟糕的情况是,我可以添加项目,内容,数据库和存档,并希望获得最佳效果。最好的情况,项目涵盖了所有内容。

Worst case scenario, I could add item, content, database, and archive and hope for the best. Best case scenario, item covers everything.

推荐答案

public.item适用于我迄今为止尝试的每种类型。

public.item works for every type I've tried so far.

这篇关于iOS文档/文件类型关联 - 通配符UTI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆