gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 16:37:16 25 4
gpt4 key购买 nike

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

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

The entry for each document type should contain the following keys:

CFBundleTypeIconFile
CFBundleTypeName
CFBundleTypeRole

In addition to these keys, it must contain at least one of the following keys:

LSItemContentTypes
CFBundleTypeExtensions
CFBundleTypeMIMETypes
CFBundleTypeOSTypes

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

在这里我们可以读到 CFBundleTypeIconFile数组不是强制性的:
Each dictionary in the CFBundleDocumentTypes array can include the following keys:

CFBundleTypeName specifies the name of the document type.
CFBundleTypeIconFiles is an array of filenames for the image resources to use as the document’s icon.
LSItemContentTypes contains an array of strings with the UTI types that represent the supported file types in this group.
LSHandlerRank describes whether this application owns the document type or is merely able to open it.

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

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

最佳答案

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

关于ios - 在 iOS 应用程序上添加自定义文件类型支持是否必须使用 CFBundleTypeIconFile 数组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27026593/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com