我正在为iOS开发的应用程序可以导入和导出属于另一个应用程序的文件。具体来说,它使用Procreate的.swatches文件。它还可以导入和导出Procreate也导入的.ase文件。当我的应用程序安装后,它会阻止Procreate查看这些文件。但如果我随后从设备中删除我的应用程序,Procreate可以重新导入这些文件。我假设问题出在info.plist中,但我无法隔离可能导致问题的设置。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Adobe Swatch Exchange</string>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.ase</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Adobe Color Swatch</string>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.aco</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>Swatches</string>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>LSItemContentTypes</key>
<array>
<string>com.procreate.swatches</string>
</array>
</dict>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict/>
</dict>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Adobe Swatch Exchange</string>
<key>UTTypeIconFiles</key>
<array/>
<key>UTTypeIdentifier</key>
<string>com.adobe.ase</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>ase</string>
</array>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>Adobe Color Swatch</string>
<key>UTTypeIconFiles</key>
<array/>
<key>UTTypeIdentifier</key>
<string>com.adobe.aco</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>aco</string>
</array>
</dict>
</dict>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeIdentifier</key>
<string>com.procreate.swatches</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>swatches</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>
1条答案
按热度按时间bqf10yzr1#
通过为相关文件类型添加导出类型标识符解决了这一问题。苹果文档表明,这些标识符对我的应用的用例来说不是必需的,但系统需要它们来知道如何处理导出的文件。