Can data files (i.e. PDF, CSV, etc) be copied to Xcode Preview?

9 Views Asked by At

Recently I had to search for how to copy data files (i.e. PDF, CSV, etc.) into my Xcode simulator for debugging sessions.

While I realize that Xcode Preview has a lot of limitations, I was curios if the same could be done to use external files like that in Previews?

For instance I have a SwiftUI view that calls uses

.fileImporter(
            isPresented: $isShowingDocumentPicker,
            allowedContentTypes: [.spreadsheet, .commaSeparatedText]) { newValue in
            }

It would be great if I could somehow place test files in a location that the Preview would access so I don't have to go to the debugger instead.

0

There are 0 best solutions below