Skip to content

Enable UISupportsDocumentBrowser to provide access to documents directory #2472

Description

@richwaters

When viewing the On iPhone folder in Files, iSH is only available through the Locations area and FileProvider extension. Enabling UISupportsDocumentBrowser in Info.plist would make the documents directory available as well. This provides another means of sharing data with other apps, and it seems that apps have more flexibility when accessing data through that On-iPhone interface than with the FileProvider extension, although I don't know the specifics. I'm not sure how it affects 'themes' or what else the Documents directory is used for, but it seems like the ability to download a theme file from Safari directly into the themes folder without requiring a mount wouldn't be a bad thing.

Activity

saagarjha commented on Oct 27, 2024

@saagarjha
Member

This seems like it is meant for use by document-based apps? That doesn’t seem like it fits very well with what iSH is.

richwaters commented on Nov 1, 2024

@richwaters
Author

Well. iSH can do a many things. I use it in order to store files (aka 'documents') in a git repository. Given the number of issues related to git, I assume some other people use it for similar reasons. While the UISupportsDocumentBrowser documentation has a top line that it is for 'document based apps', the 'Discussion' area states exacty what it actually does. This is to make the app's Documents folder available to other apps for editing and saving files.

iSH does already provide access to its files through the NSFIleProvider extension, so this might be considered redundant and possibly confusiing, but I know of at least one app (Notebooks) that cannot access the files through the extension, but that can access the files through the 'On my iPhone' option that the UISupportsDocumentBrowser supports.

There are work-arounds for the issue by using a shared folder created in Files and mounting that folder with -t iOS, but that requires use of the file selection UI. Allowing access to the Documents directory avoids that UI.

saagarjha commented on Nov 2, 2024

@saagarjha
Member

I'm not sure I understand you: you are intentionally mounting the iSH documents directory via realfs and saving content there?

richwaters commented on Nov 2, 2024

@richwaters
Author

Yes. But, I'm only doing that so I can get to the files from other apps without using the NSFileProvider extension or the iOS file selection UI.

Using my compiled version of ish with the requested mod to Info.plist, I mount the Documents directory in ish using: mount -t real `cat /proc/ish/documents` /iosdocuments

From other apps, I access these files under "On My iPhone > "iSH"

saagarjha commented on Nov 3, 2024

@saagarjha
Member

This is using the standard file picker, right? You're saying that you can see iSH there when you turn this on but not the file provider?

francoisvignon commented on Nov 3, 2024

@francoisvignon

richwaters commented on Nov 6, 2024

@richwaters
Author

This is using the standard file picker, right?

Yes. This is the Files app and standard file picker in other apps.

You're saying that you can see iSH there when you turn this on but not the file provider?

No. When I turn UISupportsDocumentBrowser on, I can see both. I can see iSH in the On My iPhone area, and I can see the iSH FileProvider in the Locations area. In some apps (like Notebooks & Textastic), though, I am unable to choose folders when using the iSH File Provider because the folders/files are greyed out. Presumably, this is disallowed in those apps because the FileProvider extension doesn't provide capabilities those apps need. When I choose items using the 'On My iPhone' option in those apps, I am allowed to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @richwaters@saagarjha@francoisvignon

        Issue actions