Hello everyone!
I am running into an issue trying to use UTType with identifiers that are not known until runtime.
For example, running this code
import UniformTypeIdentifiers
let type = UTType(importedAs: "com.example.fileformat")
creates a console warning
[Type Declaration Issues] Type "com.example.fileformat" was expected to be declared and imported in the Info.plist of Debug, but it was not found.
and a Xcode runtime warning
However, the UTType object is initialized and can be used.
identifier: com.example.fileformat
isPublic: false
isDynamic: false
isDeclared: true
Normally, this would be a simple "just add it to Info.plist", but with my program it is impossible to know all possible types at build time (content from NSPasteboard).
Does anyone know if this is a warning that can be ignored, or is this undefined behavior?
Thanks!
1
2
4.1k