使用“打开方式"从Safari打开文件.在我的应用程序中 [英] Open files from Safari with "Open in" in my app
问题描述
我需要能够通过打开方式"功能从我的应用程序中的Safari打开任何文件.当我尝试在邮件应用程序或其他自定义应用程序中打开任何文件时,我的应用程序将显示在打开方式"列表中,但我的应用程序不会出现在Safari中.为什么?我做了什么:
I need to be able to open any file from Safari in my app via the "Open in" feature. My app will appear in the "Open in"-list when I try to open any file in mail-app or another custom app, but my app won't appear in Safari. Why? What I did:
我在plist中指定了以下内容:
I specified following stuff in my plist:
- 添加了名为文档类型"的新行
- 打开的节点项目0"
- 文档类型名称"的指定值所有文件"
- 打开的节点文档内容类型UTI"
- 添加了两行
- 对于项目0",我指定了"public.data"
- 对于项目1",我指定了"public.content"
然后:
- 我打开邮件应用
- 查看带有文档附件的电子邮件
- 打开->是,出现我的应用
然后:
- 我打开Safari和Google来获取测试字文档".
- 我打开第一个Word文档,并在Safari中看到它.
- 然后我点击打开方式",但我的应用程序没有出现!
为什么?要通过Safari在我的应用程序中打开文件,我需要做些什么?
Why? What do I need to do to get the ability to open files in my app via Safari?
推荐答案
您可以尝试将"Document Role"
设置为"Editor"
我认为您的Document types
是正确的,因为Dropbox应用程序的操作方式相同
I think your Document types
is right because Dropbox app does the same way
这是Dropbox应用的info.plist的一部分
This is a part of info.plist of Dropbox app
这篇关于使用“打开方式"从Safari打开文件.在我的应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!