Код: Выделить всё
.fileImporter(isPresented: $showDocPicker, allowedContentTypes: [SupportDocTypes], onCompletion: { result in
do {
let fileURL = try result.get()
let docData = try Data(contentsOf:fileURL) //
Подробнее здесь: [url]https://stackoverflow.com/questions/71291307/swiftui-cannot-read-data-of-document-using-fileimporter-error-domain-nscocoae[/url]
Мобильная версия