注册应用程序支持的文件类型以打开来自其他应用程序的文件

时间:2016-06-08 22:21:33

标签: ios xcode uidocumentinteraction

我希望我的应用程序能够从iOS中的其他应用程序中复制文件(图像,视频等),在查看了Apple文档和一些在线资源后,我仍然无法让它工作。我附上了我的信息plist的图像。

enter image description here

这是该部分的plist代码: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>All Files</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSHandlerRank</key> <string>Owner</string> <key>LSItemContentTypes</key> <array> <string>public.data</string> <string>public.content</string> </array> </dict> </array>

1 个答案:

答案 0 :(得分:2)

如果您希望iOS在有人点击您声明的应用文件扩展名的电子邮件附件时打开您的应用,则注册文件类型会有所帮助。

但我认为你想要的是能够将另一个应用程序的文件共享到你的应用程序。您需要create an app extension of type "Share"