I am developing an app that uses the Apple Files app to import CSV files. I have implemented a file import feature using the FileImporter modifier in SwiftUI, and it works fine on a simulator. However, when I run the app on a physical device, the function that imports the data does not work. It seems like the app cannot access the files on the device.
I tried to use the FileImporter modifier in SwiftUI to import CSV files from the Apple Files app. I expected the app to ask for permission to access the files on the device, and then import the data successfully. However, the app did not ask for permission, and the function that imports the data did not work. It seems like the app cannot access the files on the device.
How can I request permission to access files on a physical device in SwiftUI? Is there any other setting or modifier that I need to use? Any help would be appreciated.