ios - 为什么可能需要为iOS或macOSbuild设置 “supported document types”?

标签 ios xcode macos app-store

XCode中的文档说明以下内容:

You can configure your app to support different document types. You can edit the document types setting in the Info pane for the target, or by editing the information property list directly.

Go to CFBundleDocumentTypes in Information Property List Key Reference for the possible values for the CFBundleTypeName (Name field), LSItemContentTypes (Types field), CFBundleTypeRole, and other keys that appear in the Info.plist file.



但是,它没有说明不同的文档类型是什么,也不说明为什么需要或需要它们。

他们是干什么的?

感谢您的阅读。

最佳答案

您指定(基于文档的)应用程序可以打开哪种类型的文档(只读或读写)。

例如。文字处理器应用可能想要打开.txt文件以进行读写,还可能显示.doc文件。

操作系统使用您在plist文件中提供的信息在Launch Services DB中注册您的应用程序。即双击.txt文件将打开包含文档的应用程序,Finder将显示提供的图标,依此类推。

关于ios - 为什么可能需要为iOS或macOSbuild设置 “supported document types”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47855841/

相关文章:

ios - iOS 9 中 UILabel 中的多行文本

ios - 如何通过滑动实现 UIActivityIndi​​cator 以删除 TableView 单元格

android - 我的 mac 在使用 Android Studio 3.2 时突然死机

macos - TOpenDialog/NSOpenPanel 无法在沙盒 Delphi 应用程序中工作

ios - 添加帐户卡在 Xcode 中

python - webbrowser.get ("firefox") 在装有 Firefox "could not locate runnable browser"的 Mac 上

ios - Xcode 6 创建新的 Objective-C 类

ios - 有没有办法通过 Alamofire 上传 doc、pdf 文件?

ios - 如何在不重新启动应用程序的情况下从应用程序内部更改应用程序的本地化?

iphone - 保留用户自定义的选项卡栏项目