I am trying to open a xcloc file, the file is a folder and the type in macOS called package. However, I could not open it as the init(configuration: ReadConfiguration) throws
never called.
struct XliffFile: FileDocument {
var xliff:XMLXliff
static var readableContentTypes: [UTType] = [
UTType(filenameExtension: "xliff", conformingTo: .data)!,
UTType(filenameExtension: "xcloc", conformingTo: .package)!
]
init(xliff: XMLXliff = XMLXliff()) {
self.xliff = xliff
}
init(configuration: ReadConfiguration) throws {
print(configuration.file.filename)
}
}
If the file is xliff, the app runs. But for xcloc file, nothing runs. If I don't use DocumentGroup but using fileImport, everything worked file.