Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa 为与动态UTI关联的文件扩展名注册UTI_Cocoa_Nsdocument_Uti - Fatal编程技术网

Cocoa 为与动态UTI关联的文件扩展名注册UTI

Cocoa 为与动态UTI关联的文件扩展名注册UTI,cocoa,nsdocument,uti,Cocoa,Nsdocument,Uti,假设基于NSDocument的应用程序定义了导出的文件类型,但没有为其指定UTI,从而导致macOS为这些文件设置动态UTI。简单地在应用程序中声明UTI似乎不会影响新编写的文件,动态UTI仍在使用。有没有办法为应用程序设置一个新的UTI以用于此文件类型?最简单的解决方案是查看应用程序文件夹中的Info.plist文件(其他人是如何操作的)。您可能还需要某种索引刷新。这将有助于:

假设基于NSDocument的应用程序定义了导出的文件类型,但没有为其指定UTI,从而导致macOS为这些文件设置动态UTI。简单地在应用程序中声明UTI似乎不会影响新编写的文件,动态UTI仍在使用。有没有办法为应用程序设置一个新的UTI以用于此文件类型?

最简单的解决方案是查看应用程序文件夹中的Info.plist文件(其他人是如何操作的)。您可能还需要某种索引刷新。这将有助于: