SeafilePro iOS/iPad App: Folder selection greyed out in the iOS/iPadOS Document Picker in 3rd Party Apps (Host App)

A host app opens the system Document Picker in folder-selection mode (on iOS this maps to UIDocumentPickerViewController initialized for UTType.folder; in SwiftUI it’s .fileImporter(allowedContentTypes: [.folder])). In this mode, iCloud Drive and Dropbox are selectable, but Seafile’s storage location is greyed out / not selectable.

Root cause

Whether a storage provider can be picked is decided by that provider’s File Provider extension, not by the host app. To be selectable when the picker asks for a directory, the extension must fully support directory (folder) operations. If it only implements file-level support, the system greys the provider out in folder mode.

What the Seafile developer needs to implement (File Provider framework)

1. Expose folders as navigable items

• NSFileProviderItem for directories must report the content type UTType.folder (public.folder) via contentType.

• The item hierarchy (parentItemIdentifier, itemIdentifier) must be correct so folders can be traversed.

2. Directory enumeration

• Provide a working NSFileProviderEnumerator (via enumerator(for:request:)) for container/folder identifiers, not just for files.

• Implement enumerateItems(for:startingAt:) (and change tracking where applicable) so the picker can list folder contents.

3. Correct capabilities on folder items

• Set the appropriate NSFileProviderItemCapabilities on directory items, at minimum .allowsContentEnumeration (and .allowsReading), so the system treats them as selectable directories.

4. Security-scoped access for directories

• Ensure the extension can vend a security-scoped URL/bookmark for a folder so the host app receives a valid, persistable directory URL (startAccessingSecurityScopedResource must work for the returned directory).

5. Materialization / on-demand availability

• Handle the case where a folder isn’t downloaded yet, so folder selection works without the contents being fully materialized.

How to verify the fix

• Host app requests [.folder] → Seafile should be selectable, and the returned URL should be a valid, security-scoped directory the app can enumerate and bookmark.

• As a diagnostic: if the host app instead requests a file type (e.g. [.pdf]), Seafile is likely already selectable today — confirming that only the directory path is missing.

Reference

Apple – File Provider framework: NSFileProviderExtension / NSFileProviderReplicatedExtension, NSFileProviderItem, NSFileProviderEnumerator, NSFileProviderItemCapabilities.

Thanks for reporting the issue and detailed analysis. We will give it a check soon.

This is fixed in the current development build and will be included in the next release. The change is in #550, which has been merged.

The previous File Provider UI extension did not declare public.folder in its supported types, so the system disabled Seafile when a host app opened the document picker in folder-selection mode. That UI extension has been removed. Seafile now uses the replicated File Provider extension, which exposes folders as UTType.folder, enumerates directory contents, and returns a directory the host app can access.

We verified this with a third-party app (a-Shell pickFolder): Seafile can be selected, and the files inside the chosen folder can be listed.

The App Store build does not include this change yet. After the next release, the same folder picker should allow selecting a Seafile library or subfolder.

Just want to say thank you for the fast implementation, new version of iOS client from App Store works flawlessly :star_struck:

Thanks for the confirmation — glad to hear the latest iOS App Store version is now working flawlessly. I’m marking this report as resolved from your perspective.