Issue with importing files from File browser to the app via SwiftUI

I'm getting the following error message on on iOS 17.1 and Xcode 15.0.1

The view service did terminate with error: Error Domain=_UIViewServiceErrorDomain Code=1 "(null)" UserInfo={Terminated=disconnect method}

In my info.plist I have given access to all file related permissions to rule out any issues

Supports opening documents in place -> YES

#if os(iOS)
            .fileImporter(isPresented: $isiOSFilePickerShown, allowedContentTypes: [.item], allowsMultipleSelection: false, onCompletion: { result in
     
                
                    do{
                        guard let selectedURL: URL = try result.get().first else { return }
                        guard selectedURL.startAccessingSecurityScopedResource() else {
                                         return
                                     }
                            //Some operation with selectedURL
                    }
                    catch let e{
                        print("error reading file \(e)")
                    }
                

            })

#endif
Issue with importing files from File browser to the app via SwiftUI
 
 
Q