在 iOS 应用程序上添加自定义文件类型支持是否必须使用 CFBundleTypeIconFile 数组?

Dmi*_*try 5 icons info.plist file-association ios

CFBundleTypeIconFile在 iOS 应用程序上添加自定义文件类型支持是否必须使用数组?我在 iOS SDK 帮助中找到了不同的信息。

\n\n

我们在这里看到该CFBundleTypeIconFile数组是强制性的:

\n\n
The entry for each document type should contain the following keys:\n\nCFBundleTypeIconFile\nCFBundleTypeName\nCFBundleTypeRole\n\nIn addition to these keys, it must contain at least one of the following keys:\n\nLSItemContentTypes\nCFBundleTypeExtensions\nCFBundleTypeMIMETypes\nCFBundleTypeOSTypes\n
Run Code Online (Sandbox Code Playgroud)\n\n

https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW9

\n\n

在这里我们可以看到该CFBundleTypeIconFile数组不是强制性的:

\n\n
Each dictionary in the CFBundleDocumentTypes array can include the following keys:\n\nCFBundleTypeName specifies the name of the document type.\nCFBundleTypeIconFiles is an array of filenames for the image resources to use as the document\xe2\x80\x99s icon.\nLSItemContentTypes contains an array of strings with the UTI types that represent the supported file types in this group.\nLSHandlerRank describes whether this application owns the document type or is merely able to open it.\n
Run Code Online (Sandbox Code Playgroud)\n\n

https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1

\n\n

真相在哪里?我可以使用空数组吗?我只是不想为文件指定自定义图像以默认使用应用程序图标。

\n

Dmi*_*try 1

文件图标看起来不错,带内没有特殊图标。