自定义sqlite UTI不工作
我试图让我的应用程序导入通过电子邮件发送的sqlite文件,因此我在我的info.plist中创建了文档类型和自定义UTI。但是,当我收到电子邮件发送的sqlite文件时,在我的应用程序中打开的选项不会出现: 以下是文档类型定义: 这是UTI 我现在将其修改为以下内容,以创建名为.icx的自定义文件扩展名。但是,当我尝试打开icx附件时,我得到的唯一选项是Dropbox、Mail和FileAppPro:自定义sqlite UTI不工作,sqlite,email-attachments,uti,Sqlite,Email Attachments,Uti,我试图让我的应用程序导入通过电子邮件发送的sqlite文件,因此我在我的info.plist中创建了文档类型和自定义UTI。但是,当我收到电子邮件发送的sqlite文件时,在我的应用程序中打开的选项不会出现: 以下是文档类型定义: 这是UTI 我现在将其修改为以下内容,以创建名为.icx的自定义文件扩展名。但是,当我尝试打开icx附件时,我得到的唯一选项是Dropbox、Mail和FileAppPro: <key>CFBundleDocumentTypes</key>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>inCommand icon114</string>
</array>
<key>CFBundleTypeName</key>
<string>icx Database</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.ncbath.inControl.icx</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>icx Database</string>
<key>UTTypeIdentifier</key>
<string>com.ncbath.inControl.icx</string>
<key>UTTypeSize320IconFile</key>
<string>inCommand icon114</string>
<key>UTTypeSize64IconFile</key>
<string>inCommand icon57</string>
<key>UTTypeTagSpecification</key>
<string>Dictionary</string>
<key>public.filename-extension</key>
<string>icx</string>
<key>public.mime-type</key>
<array>
<string>application/inControl</string>
</array>
</dict>
</array>
CbundleDocumentTypes
CbundleTypeConfigiles
指令icon114
CbundleTypeName
icx数据库
CbundleTypeRole
编辑
伊斯汉德兰克
所有者
lsItemContentType
com.ncbath.inControl.icx
UTExportedTypeDeclarations
Uttypecommisto
公共数据
UTTypeDescription
icx数据库
UTTypeIdentifier
com.ncbath.inControl.icx
UTTYPESIZE320I配置文件
指令icon114
UTTYPESIZE64I配置文件
命令icon57
Uttypetag规范
字典
public.filename-extension
icx
public.mime-type
应用程序/inControl智能驭享
我已经解决了这个问题-我发现,如果您在对UTExportedTypeDeclarations和CbundleDocumentType使用GUI条目时不小心,可能会导致字典内容混乱-在我的例子中是UTTypeTag规范。我得出结论,最好将info.plist作为源文件查看并正确编辑它。以下是工作代码:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>inCommand icon114</string>
</array>
<key>CFBundleTypeName</key>
<string>icx</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>com.ncbath.inControl.icx</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeDescription</key>
<string>icx</string>
<key>UTTypeIdentifier</key>
<string>com.ncbath.inControl.icx</string>
<key>UTTypeSize320IconFile</key>
<string>inCommand icon114</string>
<key>UTTypeSize64IconFile</key>
<string>inCommand icon57</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>icx</string>
<key>public.mime-type</key>
<string>application/x-inControl</string>
</dict>
</dict>
</array>
CbundleDocumentTypes
CbundleTypeConfigiles
指令icon114
CbundleTypeName
icx
CbundleTypeRole
编辑
伊斯汉德兰克
所有者
lsItemContentType
com.ncbath.inControl.icx
UTExportedTypeDeclarations
Uttypecommisto
公共数据
UTTypeDescription
icx
UTTypeIdentifier
com.ncbath.inControl.icx
UTTYPESIZE320I配置文件
指令icon114
UTTYPESIZE64I配置文件
命令icon57
Uttypetag规范
public.filename-extension
icx
public.mime-type
应用程序/x-inControl智能驭享