问题描述
背景:
我制作了一个自定义类,用作 NSItemProvider 以在我的应用中实现拖放功能。
writableTypeIdentifiersForItemProvider
和 readableTypeIdentifiersForItemProvider
包含一个类型,我创建的自定义 UTType 专门引用此类类 - sectionFormat
extension UTType {
public static let sectionFormat = UTType(exportedAs: "com.noah.sectionFormat")
}
问题
我收到以下错误:
[Type Declaration Issues] Type "com.noah.sectionFormat" was expected to be declared and exported in the Info.plist of Noah.app,but it was not found.
我尝试通过在源代码末尾添加以下内容在 info.plist 中进行设置:
//...
<key>UTExportedTypeDeclarations</key>
<array>
<key>UTTypeIdentifier</key>
<string>com.noah.sectionFormat</string>
</array>
</dict>
</plist>
但是错误仍然存在。我做错了什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)