here is the code in question, just in case:
.fileImporter(
isPresented: $showDialog,
allowedContentTypes: [ndsType!],
allowsMultipleSelection: true
) { result in
do {
let urls = try result.get()
for url in urls {
if url.startAccessingSecurityScopedResource() {
... // process the file here
} else {
showErrorMessage = true
break
}
}
} catch {
showErrorMessage = true
print(error)
}
}