【发布时间】:2020-09-28 03:32:34
【问题描述】:
我尝试将新的自定义文件扩展名“.uuu”添加到我的 iOS 应用程序中,我添加的 .PDF 和 .ZIP 格式可以使用,但 .uuu 格式无法使用。我不知道我哪里做错了,我检查了几次plist但没有运气。
这里是info.plist文件扩展名的内容如下:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
</array>
<key>CFBundleTypeName</key>
<string>pdf</string>
<key>LSHandlerRank</key>
<string>None</string>
</dict>
</array>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>PDFReader</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
</dict>
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>zip</string>
</array>
<key>CFBundleTypeName</key>
<string>zip</string>
<key>LSHandlerRank</key>
<string>None</string>
</dict>
</array>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>Zip</string>
<key>LSItemContentTypes</key>
<array>
<string>public.zip-archive</string>
</array>
</dict>
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>uuu</string>
</array>
<key>CFBundleTypeName</key>
<string>uuu</string>
<key>LSHandlerRank</key>
<string>None</string>
</dict>
</array>
<key>CFBundleTypeIconFiles</key>
<array/>
<key>CFBundleTypeName</key>
<string>UUU</string>
<key>LSItemContentTypes</key>
<array>
<string>public.uuuFiles</string>
</array>
</dict>
</array>
浏览器中的uuu文件是灰色的:
【问题讨论】:
标签: ios objective-c swift xcode plist