I am seeing some bizarre behaviour with the fileImporter modifier on my iOS app. When working this View code on an iPhone working iOS >= 16, it runs nice, the doc picker presents itself and passes again the consequence, no points.
@State personal var importingFile = false
var physique: some View {
Listing {
Part(header: header(), footer: footer()) {
if let uploadTitle = viewModel.uploadTitle {
RowSimple(title: localisedString(uploadTitle), withDisclosureIndicator: true)
.onTapGesture {
importingFile = true
}.fileImporter(isPresented: $importingFile, allowedContentTypes: [.pdf]) { lead to
didImportFile(withResult: consequence)
}
}
}
}
The issue happens when working on iOS 15 (probably 14, unable to check atm), whereby, nothing occurs in any respect. No doc picker is offered.
Wanting on the official documentation right here, this API is marked as iOS 14 suitable and I am positively not including an #if accessible
checks so I do know it isn’t an api compatibility difficulty.
I’ve additionally searched on OpenRadar and might’t discover a point out of the fileimporter modifier anyplace both.
Hoping one of many many geniuses right here can level me in the suitable route and probably assist me out with what I am doing improper? Recognize any assist anybody can supply.