如何注册应用程序来处理.opml
文件类型?这是我尝试添加到Info.plist
文件中的内容
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>OPML</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.opml</string>
<string>org.opml.opml</string>
<string>net.multimarkdown.opml</string>
<string>com.apple.news.opml</string>
</array>
</dict>
</array>
.opml
当通过“打开方式...”打开文件时,使用上面定义的键,应用程序不会显示在可以处理此文件类型的应用程序列表中。
我注意到,如果public.data
添加到LSItemContentTypes
数组中,它确实会在“打开方式...”列表中显示应用程序,但会为所有其他不需要的文件类型显示应用程序。是否缺少特定的内容类型?