APIs available or ways in which I can browse and read files from below mentioned sources?

Hi, so, what I'm looking to do is to provide a browsing screen for the below in my app i.e., construct the browsing UI for it and then when user selects a file here, I want to be able to open and read from it, example the 'on my iphone; tab in files has a specific path to it, if I use this to get folder structure and construct my own way of how the browse ui is supposed to look like. The storages/browsing options I want to show are,

Local Storage: The folders shown when we go to the 'On my iPhone' tab in the Files app.

Remote Storages like,

Network Shared Folder/drive: Similar to the connect to server option that is shown in the Files app, and in files app on selecting files I get a path that I can work with, but I also wanted to know how this mount happens i.e., if file gets downloaded and changes synced or folder is actually mounted on file system.

Cloud Storage: Like amazon s3, etc, can I provide a way to connect to these inapp and browse them and what would I get as path when I select a file. or can I show this option as locations in my app similar to the way it is shown in Files app.

Sync Folders: Like onedrive, etc. Same as above can I have them in app or show them as locations

Wireless Storage: Is there a way to detect a bluetooth storage being connected here, and how do I display the browse ui for it with my app?

Removable Storage: Similarly, can I detect if a pendrive was connected to iPhone and show the browsing ui for it? what would the path look like

FTP and http links: how to browse the former and stream data from the latter.

Please let me know if you have any inputs on which is possible and how. Thanks in advance

what I'm looking to do is to provide a browsing screen for the below in my app

Are you using UIKit? Or SwiftUI?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, I'm currently using SwiftUI, but if the features required are on UIKit then I don't mind integrating it into the app.

Thanks for clarifying.

I’m going to come to this point from your original post:

construct my own way of how the browse ui is supposed to look like.

Can you elaborate on that point?

To set some expectations here, iOS and its child platforms do not gives apps unrestricted access to the file system. Every app lives within a sandbox. The user can extend that sandbox in a variety of ways, the most obvious being for the app to present a system-provided file selection UI. Once the user selects a file, the system returns a URL for that file and extends the app’s sandbox to allow it to access that UI.

The puts significant limits on your ability to customise the file browsing UI. Most of that UI is presented by the system and you have limited customisation options. Alternatively, you can build your own UI from scratch, but that can only show locations for which you have access, meaning:

  • Your sandbox

  • Any locations that the user has already added to your sandbox via the system-provided file selection UI

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, thanks for responding So, I was intending to make my UI like its there in other 3rd party File Managers but in addition to that I wanted the display shown on "On my iPhone" tab in my app. I think the other parts aside from this like network folders,cloud storages etc can be solved as these 3rd party applications implement them, but I'm not sure of which APIs I should use to implement them.

With regards to what you said, 'Any locations that the user has already added to your sandbox via the system-provided file selection UI', you mean launch the System UI and store the path at some place in my app? or there's a way to permanently grant access to any location in my app from the System UI?

you mean launch the System UI and store the path at some place in my app?

Not a path, but a bookmark.

there's a way to permanently grant access to any location in my app from the System UI?

That’s part of what the bookmark does.

I’m much more familiar with this process on macOS, where it’s documented in Accessing files from the macOS App Sandbox. There are som subtle difference in the mechanics on iOS, but you should be able to achieve the same end result.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

APIs available or ways in which I can browse and read files from below mentioned sources?
 
 
Q