Questions tagged [swiftui-fileimporter]

Use this tag for questions about the SwiftUI view modifier method "fileImporter", which presents a system interface for allowing the user to import multiple files.

8 questions
4
votes
2 answers

SwiftUI .fileImporter cannot show again after dismissing by swipe down

I am using the .fileImporter modifier in SwiftUI to import pdf files in my app. I'm having a few issues. Firstly the data is slow to load and often it doesn't load and gives message Internal Error Couldn't communicate with a helper…
alionthego
  • 8,508
  • 9
  • 52
  • 125
2
votes
0 answers

FileImporter SwiftUI

I m experiencing something weird with my File Importer in SwiftUI. Here is the code I´m using to invoke the file importer : .fileImporter(isPresented: $showFilePicker, allowedContentTypes: [.data], onCompletion: { result in print(result) }) The…
1
vote
0 answers

SwiftUI file importer without buttons

I'm making some maintenance on my iOS app with SwiftUI. One feature of this app is open the Files app (using fileimporter) to select a file, import it and make some analysis to it. This has been working ok so far. But today I've suddenly found out…
Wonton
  • 1,033
  • 16
  • 33
1
vote
0 answers

FileImporter missing Select option

This is driving me crazy for many days now. I am trying to use the .fileImport() modifier in SwiftUI and apparently I am missing something VERY obvious but for the life of me I cannot find a way to have the "Select" option (see screenshots. This is…
gm_
  • 101
  • 7
0
votes
0 answers

SwiftUI `fileImporter` ViewModifier not working on iOS 15

I'm seeing some weird behaviour with the fileImporter modifier on my iOS app. When running this View code on an iPhone running iOS >= 16, it runs fine, the document picker presents itself and passes back the result, no issues. struct SomeView: View…
Brandon Stillitano
  • 1,304
  • 8
  • 27
0
votes
1 answer

Using fileImporter to import cloud folders

I'm using fileImporter to let the user select a folder: .fileImporter( isPresented: viewStore.binding(\.$fileImporterPresented), allowedContentTypes: [.folder], allowsMultipleSelection: false ) { resources in // Do something } On…
Dominik
  • 706
  • 7
  • 22
0
votes
0 answers

Swift fileImporter size limiting

So i currently have this code: .fileImporter(isPresented: .constant(true), allowedContentTypes: [.pdf]) { result in switch result { case .success(let url): if url.startAccessingSecurityScopedResource(), let pdf = try?…
Vollan
  • 1,887
  • 11
  • 26
0
votes
1 answer

SwiftUI cannot read data of Document using .fileImporter - Error Domain=NSCocoaErrorDomain Code=257

Trying to read data of document using following code block .fileImporter(isPresented: $showDocPicker, allowedContentTypes: [SupportDocTypes], onCompletion: { result in do { let fileURL = try result.get() let docData = try…
Dilan
  • 2,610
  • 7
  • 23
  • 33